-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (30 loc) · 941 Bytes
/
faa-db-update.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
name: Daily FAA Databse Update
on:
push:
branches:
- main
schedule:
# Run every day at 12:00am central time (5:00am UTC). The FAA csv files,
# are updated at 11:30am central time, so there is 30 minutes of buffer.
- cron: "0 5 * * *"
workflow_dispatch:
jobs:
update-database:
runs-on: ubuntu-latest
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DIRECT_URL: ${{ secrets.DIRECT_URL }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "latest"
cache: "yarn"
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Apply All Pending Prisma Migrations to the Database
run: yarn prisma migrate deploy
- name: Run FAA Registration Update Script
run: yarn tsx ./src/lib/update_faa_data.ts