File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Update Projects Data
2+
3+ on :
4+ schedule :
5+ - cron : " 0 0 * * *"
6+
7+ jobs :
8+ main :
9+ name : Generate and push latest data
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout Repository
14+ uses : actions/checkout@v4
15+
16+ - name : Configure python
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : ' 3.13'
20+
21+ - name : Run Python Script
22+ run : python get_repos.py
23+
24+ - name : Configure Git
25+ run : |
26+ git config user.name "github-actions[bot]"
27+ git config user.email "github-actions[bot]@users.noreply.github.com"
28+
29+ - name : Commit and Push changes
30+ env :
31+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32+ run : |
33+ if [ -n "$(git status --porcelain src/data/)" ]; then
34+ echo "[+] src/data has been updated"
35+ git add src/data/
36+ git commit -m "chore(data): update projects data"
37+ git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }} HEAD:${{ github.ref }}
38+ else
39+ echo "[-] No change in src/data/"
40+ fi
41+
You can’t perform that action at this time.
0 commit comments