Keep Repo Active #18
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: Keep Repo Active | |
| on: | |
| schedule: | |
| - cron: '0 0 */30 * *' # Every 30 days | |
| workflow_dispatch: | |
| jobs: | |
| keepalive: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout `keepalive` branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: keepalive # Checkout that specific branch | |
| - name: Make a dummy change | |
| run: | | |
| echo "Last updated at $(date -u)" > keepalive.txt | |
| - name: Commit and push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add keepalive.txt | |
| git commit -m "chore: keep repo active" || echo "No changes to commit" | |
| git push origin keepalive | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |