name: Generate Stats Images on: push: branches: [ master ] schedule: - cron: "5 0 * * *" workflow_dispatch: permissions: read-all jobs: build: runs-on: ubuntu-latest permissions: contents: write steps: # Check out repository under $GITHUB_WORKSPACE, so the job can access it - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 # Run using Python for consistency and aiohttp - name: Set up Python uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 with: python-version: '3.13' architecture: 'x64' # Cache dependencies. From: # https://github.com/actions/cache/blob/master/examples.md#python---pip - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} restore-keys: | ${{ runner.os }}-pip- # Install dependencies with `pip` - name: Install requirements run: | python3 -m pip install --upgrade pip setuptools wheel python3 -m pip install -r requirements.txt # Generate all statistics images - name: Generate images run: | python3 --version python3 generate_images.py env: ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} EXCLUDED: ${{ secrets.EXCLUDED }} EXCLUDED_LANGS: ${{ secrets.EXCLUDED_LANGS }} EXCLUDE_FORKED_REPOS: true # Commit all changed files to the repository - name: Commit to the repo run: | git config --global user.name "jstrieb/github-stats" git config --global user.email "github-stats[bot]@jstrieb.github.io" git add . # Force the build to succeed, even if no files were changed git commit -m 'Update generated files' || true git push