Tweak and elaborate on language names #5749
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | |
| # TODO: Remove this when they get their API working again | |
| # https://github.com/orgs/community/discussions/192970 | |
| MAX_RETRIES: 5 | |
| - 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 |