-
Notifications
You must be signed in to change notification settings - Fork 733
55 lines (47 loc) · 1.33 KB
/
main.yml
File metadata and controls
55 lines (47 loc) · 1.33 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
47
48
49
50
51
52
53
54
55
name: Generate Stats Images
on:
push:
branches:
- master
schedule:
- cron: "5 0 * * *"
workflow_dispatch:
permissions:
contents: write
defaults:
run:
shell: bash -euxo pipefail {0}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Checkout history branch
run: |
git config --global user.name "jstrieb/github-stats"
git config --global user.email "github-stats[bot]@jstrieb.github.io"
# Push generated files to the generated branch
git pull
git checkout generated || git checkout -b generated
git merge master || true
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2 tag
with:
version: 0.15.2
- name: Build
run: |
zig build --release
- name: Generate images
run: |
./zig-out/bin/github-stats
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
EXCLUDE_REPOS: ${{ secrets.EXCLUDE_REPOS }}
EXCLUDE_LANGS: ${{ secrets.EXCLUDE_LANGS }}
EXCLUDE_PRIVATE: "false"
DEBUG: "false"
- name: Commit to the repo
run: |
git add .
# Force the build to succeed, even if no files were changed
git commit -m 'Update generated files' || true
git push --set-upstream origin generated