@@ -2,54 +2,54 @@ name: Generate Stats Images
22
33on :
44 push :
5- branches : [ master ]
5+ branches :
6+ - master
67 schedule :
78 - cron : " 5 0 * * *"
89 workflow_dispatch :
910
1011permissions :
1112 contents : write
1213
14+ defaults :
15+ run :
16+ shell : bash -euxo pipefail {0}
17+
1318jobs :
1419 build :
1520 runs-on : ubuntu-latest
16-
1721 steps :
18- # Check out repository under $GITHUB_WORKSPACE, so the job can access it
19- - uses : actions/checkout@v3
22+ - uses : actions/checkout@v6
23+ - name : Checkout history branch
24+ run : |
25+ git config --global user.name "jstrieb/github-stats"
26+ git config --global user.email "github-stats[bot]@jstrieb.github.io"
27+ # Push generated files to the generated branch
28+ git pull
29+ git checkout generated || git checkout -b generated
30+ git merge master || true
2031
21- # Run using Python 3.8 for consistency and aiohttp
22- - name : Set up Python 3.8
23- uses : actions/setup-python@v4
32+ - uses : mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2 tag
2433 with :
25- python-version : ' 3.8'
26- architecture : ' x64'
27- cache : ' pip'
34+ version : 0.15.2
2835
29- # Install dependencies with `pip`
30- - name : Install requirements
36+ - name : Build
3137 run : |
32- python3 -m pip install --upgrade pip setuptools wheel
33- python3 -m pip install -r requirements.txt
38+ zig build --release
3439
35- # Generate all statistics images
3640 - name : Generate images
3741 run : |
38- python3 --version
39- python3 generate_images.py
42+ ./zig-out/bin/github-stats
4043 env :
4144 ACCESS_TOKEN : ${{ secrets.ACCESS_TOKEN }}
42- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43- EXCLUDED : ${{ secrets.EXCLUDED }}
44- EXCLUDED_LANGS : ${{ secrets.EXCLUDED_LANGS }}
45- EXCLUDE_FORKED_REPOS : true
45+ EXCLUDE_REPOS : ${{ secrets.EXCLUDE_REPOS }}
46+ EXCLUDE_LANGS : ${{ secrets.EXCLUDE_LANGS }}
47+ EXCLUDE_PRIVATE : " false "
48+ DEBUG : " false "
4649
47- # Commit all changed files to the repository
4850 - name : Commit to the repo
4951 run : |
50- git config --global user.name "jstrieb/github-stats"
51- git config --global user.email "github-stats[bot]@jstrieb.github.io"
5252 git add .
5353 # Force the build to succeed, even if no files were changed
5454 git commit -m 'Update generated files' || true
55- git push
55+ git push --set-upstream origin generated
0 commit comments