From 4c697fa583224f00fd7dde312bf7da745fa88628 Mon Sep 17 00:00:00 2001 From: Arjun Krishna Date: Wed, 19 Aug 2026 23:21:55 +0530 Subject: [PATCH] Serve streak card locally instead of hot-linking GitHub proxies external README images through Camo, which times out after a few seconds. streak-stats.demolab.com takes 15-26s on uncached requests, so Camo returned 504 "Error Fetching Resource" and the image rendered broken. Fetch the card in the workflow instead, where a slow response is harmless, and commit it alongside the other cards. The README now has no hot-linked images, so no card depends on Camo. curl retries and validates the response is an SVG before replacing the committed one, so a failed fetch fails the job rather than overwriting a good card with an error page. --- .github/workflows/github-readme-stats.yml | 8 ++ README.md | 2 +- profile/streak.svg | 111 ++++++++++++++++++++++ 3 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 profile/streak.svg diff --git a/.github/workflows/github-readme-stats.yml b/.github/workflows/github-readme-stats.yml index 852a003..5333c63 100644 --- a/.github/workflows/github-readme-stats.yml +++ b/.github/workflows/github-readme-stats.yml @@ -42,6 +42,14 @@ jobs: token: ${{ secrets.GH_STATS_TOKEN }} fail_on_error: true + - name: Generate streak card + run: | + curl -sS --fail --retry 5 --retry-all-errors --retry-delay 5 --max-time 90 \ + -o streak.svg \ + "https://streak-stats.demolab.com/?user=${{ github.repository_owner }}&theme=dracula" + grep -q "decoded-cipher

-

decoded-cipher

+

decoded-cipher

decoded-cipher

diff --git a/profile/streak.svg b/profile/streak.svg new file mode 100644 index 0000000..5c89686 --- /dev/null +++ b/profile/streak.svg @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 7,060 + + + + + + + Total Contributions + + + + + + + Oct 25, 2018 - Present + + + + + + + + Current Streak + + + + + + + Aug 19 + + + + + + + + + + + + + + + + + 1 + + + + + + + + + 39 + + + + + + + Longest Streak + + + + + + + May 15 - Jun 22 + + + + + + -- knotmirror 0.0.1