File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Keep scheduled workflows alive
2+
3+ on :
4+ schedule :
5+ - cron : " 23 19 17 * *" # 7:23pm on every 17th of the month
6+ workflow_dispatch :
7+
8+ jobs :
9+ job :
10+ runs-on : ubuntu-latest
11+ strategy :
12+ fail-fast : false
13+ permissions :
14+ contents : write
15+ steps :
16+ - uses : actions/checkout@v4
17+ with :
18+ persist-credentials : ' true'
19+ - name : Create and push a commit
20+ env :
21+ GIT_CONFIG_PARAMETERS : " 'user.name=CI' 'user.email=ci@github'"
22+ run : |
23+ mkdir -p .github/cached
24+ file='.github/cached/keepalive.txt'
25+ date >$file
26+ git add "$file"
27+ git commit -m "workflow keepalive" &&
28+ git push origin HEAD </dev/null || {
29+ for i in 1 2 3 4 5
30+ do
31+ # In case of concurrent pushes, let's pull and push
32+ git pull origin $GITHUB_REF </dev/null || exit 1
33+ git push origin HEAD </dev/null && exit 0
34+ done
35+ exit 1
36+ }
You can’t perform that action at this time.
0 commit comments