forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 945 Bytes
/
update-contrib-stats.yml
File metadata and controls
36 lines (29 loc) · 945 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
34
35
36
name: Update contribution stats
on:
schedule:
- cron: "17 6 * * *" # daily at 06:17 UTC
workflow_dispatch: {}
permissions:
contents: write # needed to commit/push changes :contentReference[oaicite:2]{index=2}
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Generate contrib stats
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python tools/gen_contrib_stats.py
- name: Commit & push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add _data/contrib_stats.yml
git diff --cached --quiet || git commit -m "Update contribution stats"
git push