From 6aa4591fefdb89a5d992df8bdd62d2abea891ec1 Mon Sep 17 00:00:00 2001 From: Arjun Krishna Date: Tue, 24 Feb 2026 13:54:02 +0530 Subject: [PATCH] Add GitHub Actions workflow for README stats cards --- .github/workflows/github-readme-stats.yml | 48 +++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/github-readme-stats.yml diff --git a/.github/workflows/github-readme-stats.yml b/.github/workflows/github-readme-stats.yml new file mode 100644 index 0000000..de34f36 --- /dev/null +++ b/.github/workflows/github-readme-stats.yml @@ -0,0 +1,48 @@ +name: Update README cards + +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@v6 + + - name: Generate stats card + uses: readme-tools/github-readme-stats-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: readme-tools/github-readme-stats-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 pin card + uses: readme-tools/github-readme-stats-action@v1 + with: + card: pin + options: username=readme-tools&repo=github-readme-stats + path: profile/pin-readme-tools-github-readme-stats.svg + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Commit cards + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add profile/*.svg + git commit -m "Update README cards" || exit 0 + git push -- knotmirror 0.0.1