-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (28 loc) · 868 Bytes
/
Copy pathbump-grc-badge.yml
File metadata and controls
33 lines (28 loc) · 868 Bytes
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
name: Bump GRC badge cache-buster
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Rewrite badge URL with current SHA
run: |
sed -i -E \
's|(goreportcard\.com/badge/github\.com/marzagao/aquadirector)\?v=[^)"]*|\1?v=${{ github.sha }}|g' \
README.md
- name: Commit if changed
run: |
if git diff --quiet README.md; then
echo "README already up to date"
exit 0
fi
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add README.md
git commit -m 'chore: bump GRC badge cache-buster [skip ci]'
git push