Keep-alive #104
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Keep-alive | |
on: | |
schedule: | |
# Runs every sunday at 3 a.m. | |
- cron: '0 3 * * SUN' | |
jobs: | |
call-test-workflow: | |
uses: BlueBrain/BluePyEfe/.github/workflows/test.yml@master | |
keep-workflow-alive: | |
name: Keep workflow alive | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: master | |
- name: Get date from 50 days ago | |
run: | | |
datethen=`date -d "-50 days" --utc +%FT%TZ` | |
echo "datelimit=$datethen" >> $GITHUB_ENV | |
- name: setup git config | |
if: github.event.repository.pushed_at <= env.datelimit | |
run: | | |
# setup the username and email. | |
git config user.name "Github Actions Keepalive Bot" | |
git config user.email "<>" | |
- name: commit IF last commit is older than 50 days | |
if: github.event.repository.pushed_at <= env.datelimit | |
run: | | |
git commit -m "Empty commit to keep the gihub workflows alive" --allow-empty | |
git push origin master |