Skip to content

Pranesh-2005/github-readme-stats-fast-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Readme Stats Fast Action

Generate GitHub Readme Stats Fast cards in your GitHub Actions workflow, commit them to your profile repository, and embed them directly from there.

Quick start

name: Update README cards

on:
  schedule:
    - cron: "0 0 * * *"
  workflow_dispatch:

permissions:
  contents: write

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Generate stats card
        uses: Pranesh-2005/github-readme-stats-fast-action@v1
        with:
          card: stats
          options: username=${{ github.repository_owner }}&show_icons=true
          path: profile/stats.svg
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Generate top languages card
        uses: Pranesh-2005/github-readme-stats-fast-action@v1
        with:
          card: top-langs
          options: username=${{ github.repository_owner }}&layout=compact&langs_count=6
          path: profile/top-langs.svg
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Generate streak card
        uses: Pranesh-2005/github-readme-stats-fast-action@v1
        with:
          card: streak
          options: username=${{ github.repository_owner }}&layout=compact
          path: profile/streak.svg
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Generate pin card
        uses: Pranesh-2005/github-readme-stats-fast-action@v1
        with:
          card: pin
          options: username=pranesh-2005&repo=github-readme-stats-fast
          path: profile/pin-github-readme-stats-fast.svg
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Commit cards
        run: |
          git config user.name "github-actions"
          git config user.email "github-actions@users.noreply.github.com"
          git add profile/*.svg
          git commit -m "Update README cards" || echo "No changes to commit"
          git push origin HEAD

Then embed from your profile README:

![Stats](./profile/stats.svg)
![Top Languages](./profile/top-langs.svg)
![Streak](./profile/streak.svg)
![Pinned](./profile/pin-readme-tools-github-readme-stats.svg)

Deployment options

This action is a recommended deployment option. You can also deploy on Vercel or other platforms. See the GitHub Readme Stats Fast README.

Inputs

  • card (required): Card type. Supported: stats, top-langs, streak, pin, wakatime, gist.
  • options: Card options as a query string (key=value&...) or JSON. If username is omitted, the action uses the repository owner.
  • path: Output path for the SVG file. Defaults to profile/<card>.svg.
  • token: GitHub token (PAT or GITHUB_TOKEN). For private repo stats, use a PAT with repo and read:user scopes.

Examples

Stats example:

with:
  card: stats
  options: username=octocat&show_icons=true&hide_rank=true&bg_color=0D1117
  token: ${{ secrets.GITHUB_TOKEN }}

Top languages example:

with:
  card: top-langs
  options: username=octocat&layout=compact&langs_count=6
  token: ${{ secrets.GITHUB_TOKEN }}

Streak example:

with:
  card: streak
  options: username=octocat&layout=compact
  token: ${{ secrets.GITHUB_TOKEN }}

WakaTime example:

with:
  card: wakatime
  options: username=octocat&layout=compact
  token: ${{ secrets.GITHUB_TOKEN }}

Gist example:

with:
  card: gist
  options: id=0123456789abcdef
  token: ${{ secrets.GITHUB_TOKEN }}

JSON options example:

with:
  card: stats
  options: '{"username":"octocat","show_icons":true,"hide_rank":true}'
  token: ${{ secrets.GITHUB_TOKEN }}

Notes