File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Cache
2+
3+ on :
4+ push :
5+ schedule :
6+ - cron : " 0 0 1 * *" # Midnight every month (UTC)
7+ workflow_dispatch :
8+
9+ jobs :
10+ build :
11+ name : Build
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Cache dates
16+ id : cache-dates
17+ uses : actions/cache@v4
18+ with :
19+ path : dates.txt
20+ key : dates-${{ github.run_id }}.${{ github.run_attempt }}
21+
22+ - name : Initialize dates.txt
23+ if : steps.cache-dates.outputs.cache-hit != 'true'
24+ run : touch dates.txt
25+
26+ - name : Show current dates.txt
27+ run : cat dates.txt
28+
29+ - name : Add today to dates.txt
30+ run : |
31+ date -u "+%Y-%m-%d %H:%M:%S UTC" > today.txt
32+ cat today.txt dates.txt | head -n 5 > dates.txt
33+
34+ - name : Show updated dates.txt
35+ run : cat dates.txt
You can’t perform that action at this time.
0 commit comments