-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.11 KB
/
Copy pathupdate.yml
File metadata and controls
46 lines (39 loc) · 1.11 KB
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
38
39
40
41
42
43
44
45
46
name: Refresh profile card
on:
schedule:
- cron: "17 5 * * *" # daily 05:17 UTC (08:17 Athens, 06:17 Copenhagen)
workflow_dispatch:
push:
branches: [main]
paths:
- "generate.py"
- ".github/workflows/update.yml"
permissions:
contents: write
concurrency:
group: refresh-card
cancel-in-progress: false
jobs:
refresh:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Generate SVG cards
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python generate.py
- name: Commit if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if [ -n "$(git status --porcelain assets/)" ]; then
git add assets/card-dark.svg assets/card-light.svg
git commit -m "chore(card): refresh stats $(date -u +%Y-%m-%d)"
git push
else
echo "no changes"
fi