Skip to content

Commit to keep workflows active #1107

Commit to keep workflows active

Commit to keep workflows active #1107

Workflow file for this run

name: Commit to keep workflows active
on:
schedule:
- cron: '00 12 * * *'
jobs:
heartbeat:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Repository Heartbeat"
- name: Make & push an empty commit
run: |
last_commit="$(git show -s --format=%at)"
cutoff="$(date --date='50 days ago' +%s)"
if [ "$last_commit" -lt "$cutoff" ]
then git commit --allow-empty -m '[EMPTY] Commit to keep workflows active'
git push
else echo 'Latest activity was within past 50 days; not committing'
fi