profile
This commit is contained in:
1 parent
de7259d32b
commit
41858dbf48
5 files changed
+314
-1
No files matched your search
@@ -0,0 +1,37 @@
|
||||
name: Regenerate profile stats cards
|
||||
# Runs daily; recompute stats cards via the repo's own generate_stats.py
|
||||
# (stdlib-only, no external service) and commit them to this repo, where
|
||||
# README.md embeds them.
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "30 4 * * *"
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
stats:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout profile repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate stats images
|
||||
env:
|
||||
GIT_URL: https://git.turbo-data.com
|
||||
USER: doctasmooth
|
||||
# Token with "read:user" + "read:repository" scopes; include private
|
||||
# repos in the stats. Leave empty to only use public data.
|
||||
ACCESS_TOKEN: ${{ secrets.STATS_READ_TOKEN }}
|
||||
run: python3 generate_stats.py
|
||||
|
||||
- name: Commit updated cards
|
||||
run: |
|
||||
git config user.name "stats-bot"
|
||||
git config user.email "[email protected]"
|
||||
git add stats/
|
||||
if [[ -n "$(git status --porcelain stats/)" ]]; then
|
||||
git commit -m "chore: regenerate profile stats cards"
|
||||
git push https://${{ secrets.STATS_COMMIT_TOKEN }}@git.turbo-data.com/doctasmooth/.profile.git HEAD:main
|
||||
else
|
||||
echo "Stats unchanged, nothing to commit"
|
||||
fi
|
||||
Reference in new issue
Block a user