GitHub Achievements Progress

GitHub Action: keep an achievements progress card in your profile README

The action installs gh-achievements, draws the SVG card from your current GitHub data, and commits it to the repository only when it changed. Put it in your profile repository (the public repository named exactly like your username) and the card in your profile README stays up to date.

Quick setup

  1. In your profile repository, create .github/workflows/achievements.yml:

    name: Update achievements card
    
    on:
      schedule:
        - cron: "17 4 * * *"   # every day at 04:17 UTC
      workflow_dispatch:        # lets you run it by hand from the Actions tab
    
    permissions:
      contents: write           # needed to commit the card
    
    jobs:
      card:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v7
          - uses: Shahnawaz75/github-achievements-progress@main   # pin a release tag or commit SHA once available
            with:
              output: achievements.svg
              dark-output: achievements-dark.svg
              # token: $   # optional, see "Which token?"
    
  2. Run it once from the Actions tab (Run workflow), so the SVG files exist.
  3. Add the card to your profile README.md:

    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="achievements-dark.svg">
      <img alt="My GitHub achievements progress" src="achievements.svg">
    </picture>
    

Inputs

Input Default Description
username repository owner GitHub username to report on.
output achievements.svg Path of the SVG card to write.
theme light Theme of the card in output: light or dark.
dark-output empty Optional path of a second, dark-theme card.
token $ Token for the read-only API calls. See below.
commit true Commit and push the card(s) when they changed. Set to false to commit yourself.
commit-message chore: update GitHub achievements card Message of that commit.
python-version 3.12 Python version used to run the tool.

Output: changed is "true" when a card changed and was committed.

Which token?

The token is only used to read data. Pushing the commit uses the credentials from actions/checkout, which is why the workflow needs permissions: contents: write.

Your private data stays private: the card shows only counts and tiers, never repository names, and the token is never printed in the logs.

Troubleshooting

Without the action

The action is a thin wrapper around the CLI. You can do the same in any CI system:

pip install git+https://github.com/Shahnawaz75/github-achievements-progress
GITHUB_TOKEN=... gh-achievements card <username> -o achievements.svg --dark-output achievements-dark.svg