Keep Alive #426
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 Alive | |
| on: | |
| repository_dispatch: | |
| types: [manual_trigger] | |
| schedule: | |
| - cron: '0 0 * * *' # Runs daily at midnight | |
| push: | |
| paths: | |
| - '.github/workflows/keep-alive.yml' # Trigger when this workflow file is modified | |
| jobs: | |
| keep_alive: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Grant write permission to the repository contents | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: keep-alive | |
| - name: Keep Alive Commit | |
| run: | | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "actions@github.com" | |
| TIME=$(date -Isecond -u) | |
| echo $TIME > keep-alive.txt | |
| git add keep-alive.txt | |
| git commit -m "keep-alive: $TIME" | |
| git push origin keep-alive |