-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 943 Bytes
/
stats-org.yml
File metadata and controls
40 lines (31 loc) · 943 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
36
37
38
39
40
# .github/workflows/update-stats.yml
name: Update Org Stats
on:
workflow_dispatch:
schedule:
- cron: "0 * * * *" # Berjalan setiap jam
jobs:
update-readme:
runs-on: ubuntu-latest
# Berikan izin kepada job ini untuk menulis ke isi repositori
# Ini adalah langkah krusial agar bisa melakukan push
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: pip install requests
- name: Generate Org Stats
run: python gen_stats.py
env:
TOKEN: ${{ secrets.PAT }}
- name: Commit and Push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: Update Org Stats"
file_pattern: profile/README.md