-
Notifications
You must be signed in to change notification settings - Fork 29
51 lines (51 loc) · 1.66 KB
/
upsert-courses.yaml
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: Script - npm run db:populate
on:
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 18.19.0
- name: Cache npm dependencies
uses: actions/cache@v2
with:
key: npm-${{ hashFiles('package-lock.json') }}
path: ~/.npm
restore-keys: |
npm-
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-progress
- name: Lint
run: npm run lint
npm-run:
name: Execute Script
needs: [lint]
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment }}
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 18.19.0
- name: Cache npm dependencies
uses: actions/cache@v2
with:
key: npm-${{ hashFiles('package-lock.json') }}
path: ~/.npm
restore-keys: |
npm-
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-progress
# TODO: now its complaining about the prisma client, find a way to install all of these machine dependencies better
- name: Install ts-node globally
run: npm install -g [email protected]
- name: Install prisma client globally
run: npm install -g @prisma/[email protected]
- name: Execute Script
run: ts-node ./scripts/upsert/courses.ts ${{ github.event.inputs.term }} ${{ github.event.inputs.registrationDate }} ${{ github.event.inputs.dropDate }}