Skip to content

Data Fetch

Data Fetch #938

Workflow file for this run

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