-
-
Notifications
You must be signed in to change notification settings - Fork 63
47 lines (38 loc) · 1.07 KB
/
data-fetch.yml
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
41
42
43
44
45
46
47
name: Data Fetch
on:
schedule:
- cron: "0 7 * * *" # Every day at midnight PDT
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
with:
token: ${{ secrets.WORKFLOW_PUSH_BOT_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install npm packages
run: npm install
- name: Fetch team data
run: npm run fetch:team
env:
ESLINT_GITHUB_TOKEN: ${{ secrets.DATA_FETCH_TOKEN }}
- name: Fetch project stats
run: npm run fetch:stats
env:
ESLINT_GITHUB_TOKEN: ${{ secrets.DATA_FETCH_TOKEN }}
- name: Fetch sponsor data
run: npm run fetch:sponsors
env:
ESLINT_GITHUB_TOKEN: ${{ secrets.DATA_FETCH_TOKEN }}
- name: Setup Git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<[email protected]>"
- name: Save updated files
run: |
chmod +x ./tools/commit-data.sh
./tools/commit-data.sh