-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (27 loc) · 837 Bytes
/
update-stats.yml
File metadata and controls
35 lines (27 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Update GitHub Stats
on:
schedule:
- cron: "0 0 * * 1"
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)