Skip to content

Commit

Permalink
GitHub Actions - Replace keepalive-workflow with custom code
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemhall committed Oct 6, 2022
1 parent 38a253c commit 0efd311
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ jobs:

- uses: actions/checkout@v1

- uses: gautamkrishnar/keepalive-workflow@v1 # Keeps GitHub from pausing cron'ed actions

- name: Get Koha Version Branch Name
id: koha-version
uses: "bywatersolutions/github-action-koha-get-version-by-label@master"
Expand Down Expand Up @@ -189,3 +187,19 @@ jobs:
CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
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 0efd311

Please sign in to comment.