Skip to content

Keep Alive

Keep Alive #1

Workflow file for this run

name: Keep Alive
on:
workflow_dispatch:
schedule:
# Run every 30 days at 00:00 UTC to keep the repository active
- cron: '0 0 */30 * *'
jobs:
keep-alive:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update keep-alive file
run: |
mkdir -p .github
echo "Last run: $(date -u +'%Y-%m-%d %H:%M:%S UTC')" > .github/keep-alive.txt
echo "This file is automatically updated to keep the repository active and prevent GitHub Actions from disabling scheduled workflows." >> .github/keep-alive.txt
- name: Commit and push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .github/keep-alive.txt
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: update keep-alive timestamp [skip ci]"
git push
fi