Generate GitHub Profile Trophy cards in your GitHub Actions workflow, commit them to your profile repository, and embed them directly from there.
This Action uses the Go implementation of github-profile-trophy service, downloading pre-built binaries from GitHub Releases and calling them via CLI to generate trophy cards.
name: Update README trophy
on:
schedule:
- cron: "0 0 * * *" # Runs once daily at midnight
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Generate trophy card
uses: soulteary/github-profile-trophy-action@v1.0.0
with:
options: 'username=${{ github.repository_owner }}&theme=gruvbox&column=7&margin-w=15&margin-h=15'
path: profile/trophy.svg
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit trophy card
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add profile/trophy.svg
git commit -m "Update README trophy" || exit 0
git pushThen embed from your profile README:
This action is a recommended deployment option. You can also deploy on Vercel or other platforms. See the GitHub Profile Trophy README.
options: Options for the trophy card as a query string (key=value&...) or JSON. Ifusernameis omitted, the action uses the repository owner.path: Output path for the SVG file. Defaults toprofile/trophy.svg.token: GitHub token (PAT orGITHUB_TOKEN). For private repo stats, use a PAT withrepoandread:userscopes.version: Version of github-profile-trophy binary to use (e.g.,v1.0.0). Defaults tov1.0.0. Uselatestto get the latest release.repo: GitHub repository in formatowner/repo. Defaults tosoulteary/github-profile-trophy.
path: Path where the SVG file was written.
The options input accepts the following parameters:
username(required) - GitHub usernametheme- Theme name (default: "default")column- Maximum number of columns (default: 8, use-1for adaptive)row- Maximum number of rows (default: 3)margin-w- Horizontal margin between trophies (default: 0)margin-h- Vertical margin between trophies (default: 0)title- Filter by trophy titles (comma-separated, use-prefix to exclude)rank- Filter by ranks (comma-separated, use-prefix to exclude)no-bg- Transparent background (default: false)no-frame- Hide frames (default: false)
- name: Generate trophy card
uses: soulteary/github-profile-trophy-action@v1.0.0
with:
options: 'username=${{ github.repository_owner }}'
path: .github/assets/trophy.svg
token: ${{ secrets.GITHUB_TOKEN }}- name: Generate trophy card
uses: soulteary/github-profile-trophy-action@v1.0.0
with:
options: 'username=${{ github.repository_owner }}&theme=onedark'
path: .github/assets/trophy.svg
token: ${{ secrets.GITHUB_TOKEN }}- name: Generate trophy card
uses: soulteary/github-profile-trophy-action@v1.0.0
with:
options: 'username=${{ github.repository_owner }}&title=Stars,Followers'
path: .github/assets/trophy.svg
token: ${{ secrets.GITHUB_TOKEN }}- name: Generate trophy card
uses: soulteary/github-profile-trophy-action@v1.0.0
with:
options: 'username=${{ github.repository_owner }}&rank=S,AAA'
path: .github/assets/trophy.svg
token: ${{ secrets.GITHUB_TOKEN }}- name: Generate trophy card
uses: soulteary/github-profile-trophy-action@v1.0.0
with:
options: 'username=${{ github.repository_owner }}&column=3&row=2&margin-w=15&margin-h=15'
path: .github/assets/trophy.svg
token: ${{ secrets.GITHUB_TOKEN }}- name: Generate trophy card
uses: soulteary/github-profile-trophy-action@v1.0.0
with:
options: 'username=${{ github.repository_owner }}&theme=gruvbox&no-bg=true&no-frame=true'
path: .github/assets/trophy.svg
token: ${{ secrets.GITHUB_TOKEN }}- name: Generate trophy card
uses: soulteary/github-profile-trophy-action@v1.0.0
with:
options: '{"username":"${{ github.repository_owner }}","theme":"gruvbox","column":7,"margin-w":15,"margin-h":15}'
path: .github/assets/trophy.svg
token: ${{ secrets.GITHUB_TOKEN }}- name: Generate trophy card
uses: soulteary/github-profile-trophy-action@v1.0.0
with:
options: 'username=${{ github.repository_owner }}&theme=gruvbox'
path: profile/trophy.svg
token: ${{ secrets.GITHUB_TOKEN }}
version: v1.0.0 # Use specific version
# version: latest # Or use latest releaseChoose from 20+ beautiful themes! All themes from the original project are supported.
Click to view all themes
- Stars, Commits, Followers, Issues, Pull Requests, Repositories, Reviews
- MultiLanguage (10+ languages)
- AllSuperRank (all base trophies are S rank or higher)
- LongTimeUser (10+ years)
- AncientUser (before 2010)
- OGUser (before 2008)
- Joined2020 (joined in 2020)
- Organizations (3+ organizations)
- Experience (account duration)
Ranks are: SECRET, SSS, SS, S, AAA, AA, A, B, C, UNKNOWN
This action works by:
- Detecting Platform: Automatically detects the OS (Linux/macOS) and architecture (amd64/arm64)
- Downloading Binary: Downloads the pre-built binary from GitHub Releases for the specified version
- Calling CLI: Invokes the Go binary's CLI mode with the provided options
- Saving File: Writes the generated SVG to the specified path
| Feature | Original Version | This Version |
|---|---|---|
| Implementation | Node.js | Bash |
| Service Call | Direct library function call | CLI call to Go binary |
| Dependencies | Node.js + npm package | curl (pre-installed) |
| Build | npm install | Download from Releases |
| Binary Source | npm package | GitHub Releases |
- Linux (amd64, arm64)
- macOS (amd64, arm64)
The action automatically detects your runner's platform and downloads the appropriate binary.
- This action uses the same renderers and fetchers as soulteary/github-profile-trophy.
- No Go environment required - binaries are pre-built and downloaded from Releases.
- The service binary is temporarily downloaded and executed during the action run.
- For best performance, specify a version instead of using
latestto avoid API calls.
MIT License