File tree Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ name: Commit Meeting Summaries
3
3
on :
4
4
workflow_dispatch :
5
5
schedule :
6
- - cron : ' 0 0 * * *' # Run daily at midnight
6
+ - cron : " 0 0 * * *" # Run daily at midnight
7
+ permissions :
8
+ contents : write
7
9
jobs :
8
10
commit-meeting-summaries :
9
11
runs-on : ubuntu-latest
33
35
else
34
36
echo "Error updating meeting summaries by ID"
35
37
exit 1
36
- fi
38
+ fi
39
+ - name : Check out repository
40
+ uses : actions/checkout@v4
41
+ with :
42
+ ref : ${{ github.ref }}
43
+ fetch-depth : 0
44
+ persist-credentials : true
45
+ - name : Update README timestamp
46
+ run : |
47
+ set -e
48
+ TS=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
49
+ if grep -q '^Archive data last updated at - ' README.md; then
50
+ sed -i "s/^Archive data last updated at - .*/Archive data last updated at - ${TS}/" README.md
51
+ else
52
+ echo "" >> README.md
53
+ echo "Archive data last updated at - ${TS}" >> README.md
54
+ fi
55
+ - name : Commit and push changes
56
+ run : |
57
+ set -e
58
+ git config user.name "github-actions[bot]"
59
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
60
+ git add README.md
61
+ if git diff --staged --quiet; then
62
+ echo "No README changes to commit."
63
+ exit 0
64
+ fi
65
+ git commit -m "docs: update README with latest archive data timestamp [skip ci]"
66
+ git push origin HEAD:${GITHUB_REF_NAME}
You can’t perform that action at this time.
0 commit comments