11name : Code
22
33on :
4- schedule :
5- - cron : " 0 */2 * * *" # Every 2 hours
64 pull_request :
75 branches :
8- - main
6+ - main # ✅ Change this if your default branch is different
97 workflow_dispatch :
8+ # schedule:
9+ # - cron: "0 0 * * *" # Every day at 00:00 UTC
10+ # - cron: "0 10 * * *" # Every day at 10:00 UTC
11+ # - cron: "0 16 * * *" # Every day at 16:00 UTC
12+ # - cron: "0 22 * * *" # Every day at 22:00 UTC
1013
1114permissions :
12- contents : write
13- actions : read
15+ contents : write # ✅ To push updates or create PRs
16+ actions : read # ✅ To allow action execution
1417
1518jobs :
1619 metrics :
1720 runs-on : ubuntu-latest
1821
1922 steps :
23+ # 1️⃣ Checkout your profile repo
2024 - name : 🦑 Checkout repo
2125 uses : actions/checkout@v4
2226 with :
2327 fetch-depth : 0
2428 persist-credentials : false
2529
30+ # 2️⃣ Install jq (required by lowlighter/metrics)
2631 - name : 🦑 Install jq
2732 run : |
2833 sudo apt-get update
2934 sudo apt-get install -y jq
30-
35+ # Code
3136 - name : 🐙Code
3237 if : ${{ success() || failure() }}
3338 uses : lowlighter/metrics@latest
@@ -40,12 +45,14 @@ jobs:
4045 plugin_code : yes
4146 plugin_code_lines : 12
4247 plugin_code_visibility : public
43- plugin_code_languages : python
48+ plugin_code_languages : python
49+
4450
51+ # 9️⃣ Commit & push all SVG updates to a PR
4552 - name : 🦑 Commit & Create PR
4653 uses : peter-evans/create-pull-request@v6
4754 with :
4855 token : ${{ secrets.GH_METRICS_TOKEN }}
4956 branch : metrics-update
5057 title : " chore: update all metrics SVGs"
51- body : " Auto-generated metrics via lowlighter/metrics"
58+ body : " Auto-generated metrics via lowlighter/metrics"
0 commit comments