-
Notifications
You must be signed in to change notification settings - Fork 38
36 lines (30 loc) · 1014 Bytes
/
keep-alive.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Keep-alive
on:
schedule:
# Runs every sunday at 3 a.m.
- cron: '0 3 * * SUN'
jobs:
call-test-workflow:
uses: BlueBrain/eFEL/.github/workflows/test.yml@master
keep-workflow-alive:
name: Keep workflow alive
runs-on: ubuntu-20.04
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