Skip to content

Update scores cronjob #6173

Update scores cronjob

Update scores cronjob #6173

name: Update scores cronjob
on:
schedule:
- cron: "*/30 * * * *"
jobs:
update-scores:
runs-on: ubuntu-20.04
name: Update scores
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
name: Configure node
with:
node-version: '20.12.2'
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: rm yarn.lock package.json .yarnrc.yml && npm install node-fetch dayjs blitz @prisma/client && npx --yes prisma generate --schema='./db/schema.prisma'
- name: Update scores
run: DATABASE_URL=${{env.DATABASE_URL}} npx --yes tsx ./db/updateScores.ts
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}