Skip to content

Refresh profile card #145

Refresh profile card

Refresh profile card #145

Workflow file for this run

name: Refresh profile card
on:
schedule:
- cron: "17 5 * * *" # daily 05:17 UTC (08:17 Athens, 06:17 Copenhagen)
workflow_dispatch:
push:
branches: [main]
paths:
- "generate.py"
- ".github/workflows/update.yml"
permissions:
contents: write
concurrency:
group: refresh-card
cancel-in-progress: false
jobs:
refresh:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Generate SVG cards
env:
GH_TOKEN: ${{ secrets.CARD_TOKEN || secrets.GITHUB_TOKEN }}
run: python generate.py
- name: Commit if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A assets/
if git diff --cached --quiet; then
echo "no changes"
exit 0
fi
git commit -m "chore(card): refresh stats $(date -u +%Y-%m-%d)"
git push