-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 1.11 KB
/
update-bages.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: Update Badges
on:
push:
branches: ['master']
jobs:
badges:
name: Update badges
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update badges
run: |
PACKAGE_VERSION=$(jq -r '.version' packages/extension/package.json)
FORMATTED_DATE=$(date +"%d.%m.%Y")
echo $PACKAGE_VERSION
echo $TIMESTAMP
curl -o .github/badges/extension-version.svg "https://img.shields.io/badge/repository_extension_version-v$PACKAGE_VERSION-orange"
if ! git diff --quiet -- .github/badges/; then
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .github/badges/
git commit -m "Update extension version badge to $PACKAGE_VERSION"
git push
else
echo "No changes in the badges directory."
fi