Skip to content

Keepalive

Keepalive #14

Workflow file for this run

name: Keepalive
on:
schedule:
- cron: "17 6 * * *"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: keepalive
cancel-in-progress: false
jobs:
heartbeat:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Update heartbeat file
run: |
mkdir -p .github
cat > .github/heartbeat.json <<EOF
{
"last_run": "$(date -u '+%Y-%m-%dT%H:%M:%SZ')",
"run_number": ${{ github.run_number }},
"workflow": "${{ github.workflow }}"
}
EOF
- name: Commit and push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .github/heartbeat.json
if git diff --cached --quiet; then
echo "Nothing changed — skipping commit."
exit 0
fi
git commit -m "chore: update heartbeat [skip ci]"
git push