Add GitHub Actions card generation#904
Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-party GitHub Actions support for generating static streak stats SVGs using the existing PHP stats/card pipeline.
Changes:
- Extracts shared streak-stat generation into
src/generator.phpand uses it fromsrc/index.php. - Adds a CLI entrypoint and composite
action.ymlfor generating SVG output in workflows. - Documents profile README workflow usage in
README.md.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/index.php |
Reuses the shared generator for HTTP requests. |
src/generator.php |
Adds reusable stats generation with cache support. |
bin/generate-card.php |
Adds CLI/action entrypoint for parsing options and writing SVG output. |
action.yml |
Defines the composite GitHub Action. |
README.md |
Documents workflow setup and embedding generated SVGs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DenverCoder1
left a comment
There was a problem hiding this comment.
I love this approach! Thanks so much for the contribution!
This should reduce a lot of the server error complaints since it does not rely on Heroku's availability.
Co-authored-by: Jonah Lawrence <jonah@freshidea.com>
|
All review feedback has been addressed. The workflow trigger suggestion was added, and the README now includes a dedicated section showing how to embed the generated static SVG in a profile README. |
Summary
profile/streak.svgwithout depending on the public hosted endpoint.Test plan
npx prettier --check README.md action.yml src/index.php src/generator.php bin/generate-card.php.workflow_dispatch; it generated and committedprofile/streak.svg..Notes
GITHUB_TOKENby default.tokeninput.