Check Archived Repositories #127
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check Archived Repositories | |
| on: | |
| schedule: | |
| - cron: '0 0 * * 0,2,4' # (Sun/Tue/Thu at 00:00 UTC) | |
| workflow_dispatch: | |
| jobs: | |
| check-archives: | |
| runs-on: macos-14 | |
| permissions: | |
| contents: write | |
| actions: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Swift | |
| uses: swift-actions/setup-swift@v2 | |
| with: | |
| swift-version: "5.10.1" | |
| - name: Build archive-bot | |
| run: swift build -c release | |
| - name: Run archive-bot | |
| run: .build/release/archive-bot | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name 'GitHub Action' | |
| git config --global user.email '[email protected]' | |
| git add README.md | |
| git diff --cached --quiet || git commit -m 'ci(bot): update archive status table' | |
| git push | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |