Skip to content

Commit

Permalink
Add keepalive
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemhall committed Aug 20, 2024
1 parent 506c5a8 commit 3a7248d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,19 @@ jobs:
run: TAG=${GITHUB_REF##*/} ./rebase_branches.sh
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

keepalive:
name: Keep Alive
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check age and push commit if needed
run: |
LAST_COMMIT=$( git --no-pager log -1 --format=%ct )
NOW=$(date +%s)
DIFF=$(($NOW-$LAST_COMMIT))
DAYS=$(($DIFF/86400))
git config --global user.email [email protected]
git config --global user.name "Kyle M Hall"
git commit --allow-empty -m "Automated commit from keep alive workflow"
if [ "$DAYS" -gt "50" ]; then git push; fi

0 comments on commit 3a7248d

Please sign in to comment.