File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Data Fetch
2+
3+ on :
4+ schedule :
5+ - cron : " 0 8 * * *" # Every day at 1am PDT
6+ workflow_dispatch :
7+
8+ jobs :
9+ update-readme :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Check out repo
13+ uses : actions/checkout@v4
14+ with :
15+ token : ${{ secrets.WORKFLOW_PUSH_BOT_TOKEN }}
16+
17+ - name : Set up Node.js
18+ uses : actions/setup-node@v4
19+
20+ - name : Install npm packages
21+ run : npm install --force
22+
23+ - name : Update README with latest team and sponsor data
24+ run : npm run build:readme
25+
26+ - name : Setup Git
27+ run : |
28+ git config user.name "GitHub Actions Bot"
29+ git config user.email "<[email protected] >" 30+
31+ - name : Save updated files
32+ run : |
33+ chmod +x ./tools/commit-readme.sh
34+ ./tools/commit-readme.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # ------------------------------------------------------------------------------
4+ # Commits the data files if any have changed
5+ # ------------------------------------------------------------------------------
6+
7+ if [ -z " $( git status --porcelain) " ]; then
8+ echo " Data did not change."
9+ else
10+ echo " Data changed!"
11+
12+ # commit the result
13+ git add README.md packages/** /README.md
14+ git commit -m " docs: Update README sponsors"
15+
16+ # push back to source control
17+ git push origin HEAD
18+ fi
You can’t perform that action at this time.
0 commit comments