-
-
Notifications
You must be signed in to change notification settings - Fork 63
51 lines (42 loc) · 1.27 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
48
49
50
51
name: Data Fetch
on:
schedule:
- cron: "0 7 * * *" # Every day at midnight PDT
push:
tags:
- "v*" # After each release
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
ref: "main" # Necessary when a tag triggers the workflow. Without this, the tag would be checked out and so the commit would not update the main branch.
token: ${{ secrets.WORKFLOW_PUSH_BOT_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v4
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