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.
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?"
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>
| 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.
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.
github.token): works with no setup. It’s limited to the repository running the workflow plus public data, so the card counts your public activity only. Some GraphQL fields may not be available to this kind of token; those rows then show “not available” on the card.ACHIEVEMENTS_TOKEN (Settings > Secrets and variables > Actions) and pass token: $.A classic token with the repo scope also works, but it can write to all your repositories, which is more than this needs.
Your private data stays private: the card shows only counts and tiers, never repository names, and the token is never printed in the logs.
Permission to <repo> denied to github-actions[bot] when pushing. Add permissions: contents: write to the workflow, or allow Read and write permissions under Settings > Actions > General > Workflow permissions.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