Skip to content

Update GitHub Stats #10

Update GitHub Stats

Update GitHub Stats #10

Workflow file for this run

name: Update GitHub Stats
on:
# S'exรฉcute tous les lundis ร  00:00 UTC
# schedule:
# - cron: "0 0 * * 1"
# Permet de lancer manuellement depuis l'onglet Actions
workflow_dispatch:
jobs:
update-stats:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: ๐Ÿ“ฅ Checkout repository
uses: actions/checkout@v4
- name: ๐Ÿ”ง Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: ๐Ÿ“Š Generate stats
run: node generate-stats.js
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: ๐Ÿ“ค Commit and push changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add *.svg
git diff --quiet && git diff --staged --quiet || (git commit -m "๐Ÿ”„ Update stats [skip ci]" && git push)