🧘 Keep Workflows Active #1
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 Workflows Active | |
| on: | |
| schedule: | |
| # Run on the 1st day of every month at 4:05 AM | |
| - cron: '5 4 1 * *' | |
| # Allow manual runs from the GitHub UI for testing | |
| workflow_dispatch: | |
| jobs: | |
| update-timestamp: | |
| runs-on: ubuntu-latest | |
| # write permissions to push a commit to the repo | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Update activity timestamp | |
| run: | | |
| # Create a specific, non-intrusive directory for this file | |
| mkdir -p .github/activity | |
| # Write the current ISO 8601 date to the file | |
| # This ensures the file content actually changes, triggering the commit | |
| echo "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" > .github/activity/timestamp | |
| - name: Commit and push changes | |
| uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: "chore(activity): Update timestamp to keep workflows active" | |
| file_pattern: ".github/activity/timestamp" | |
| commit_user_name: "github-actions[bot]" | |
| commit_user_email: "github-actions[bot]@users.noreply.github.com" | |
| commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" |