Skip to content

Update clone badges

Update clone badges #7

name: Update clone badges
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update badges
env:
TRAFFIC_TOKEN: ${{ secrets.TRAFFIC_TOKEN }}
run: |
python3 scripts/update_clones_badges.py
- name: Commit & push if changed
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changes."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .github/traffic/*.json
git commit -m "Update clone badges"
git push