diff --git a/.github/workflows/star-history.yml b/.github/workflows/star-history.yml new file mode 100644 index 00000000..663ed69d --- /dev/null +++ b/.github/workflows/star-history.yml @@ -0,0 +1,38 @@ +name: Update Star History Chart + +on: + workflow_dispatch: + schedule: + # Daily at 06:00 UTC + - cron: "0 6 * * *" + +permissions: + contents: write + +jobs: + update-star-history: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Fetch latest chart (SVG) + run: | + set -euo pipefail + mkdir -p assets + curl -fsSL \ + "https://api.star-history.com/svg?repos=sickn33/antigravity-awesome-skills&type=date&legend=top-left" \ + -o assets/star-history.svg + + - name: Commit and push if changed + run: | + set -euo pipefail + if git diff --quiet; then + echo "No changes in star-history.svg" + exit 0 + fi + + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add assets/star-history.svg + git commit -m "chore: update star history chart" + git push diff --git a/README.md b/README.md index f5f02cfc..652f8ab7 100644 --- a/README.md +++ b/README.md @@ -525,4 +525,4 @@ We officially thank the following contributors for their help in making this rep ## Star History -[![Star History Chart](https://api.star-history.com/svg?repos=sickn33/antigravity-awesome-skills&type=date&legend=top-left)](https://www.star-history.com/#sickn33/antigravity-awesome-skills&type=date&legend=top-left) +[![Star History Chart](assets/star-history.svg)](https://www.star-history.com/#sickn33/antigravity-awesome-skills&type=date&legend=top-left) diff --git a/assets/star-history.svg b/assets/star-history.svg new file mode 100644 index 00000000..2303ab68 --- /dev/null +++ b/assets/star-history.svg @@ -0,0 +1,9 @@ + + + + Star History chart will be generated by CI. + + + Run the Update Star History Chart workflow to refresh. + +