-
Notifications
You must be signed in to change notification settings - Fork 19
37 lines (32 loc) · 1.07 KB
/
cache-bust.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
37
name: Monthly Build
# This workflow simply updates the .cache-buster file, which then:
# - triggers the docker build workflow for the image to be rebuilt
# - busts the docker build cache so each tool is built at its newest version
on:
schedule:
# run weekly
# - cron: '0 0 * * SUN'
# run monthly
- cron: '0 0 1 * *'
jobs:
build:
name: Monthly build
runs-on: ubuntu-latest
# Only run on the main branch of the main repo
if: ${{ github.repository == 'ethack/tht' && github.ref == 'refs/heads/main' }}
steps:
-
name: Checkout code
uses: actions/checkout@v3
with:
# use a custom PAT in order to trigger other workflows with the push event
# https://github.com/stefanzweifel/git-auto-commit-action#commits-made-by-this-action-do-not-trigger-new-workflow-runs
token: ${{ secrets.GH_PAT }}
-
name: Overwrite .cache-buster
run: date --utc --rfc-email > .cache-buster
-
name: Push code
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Monthly build