-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (41 loc) · 1.13 KB
/
migrations.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
name: Hasura migration
on:
push:
branches:
- "release/*"
- "feature/*"
- "hotfix/*"
paths:
- "migrations/**"
jobs:
hasura-migration:
name: Hasura migration
runs-on: ubuntu-latest
environment: staging
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Apply hasura migrations
uses: tibotiber/hasura-action@master
with:
args: migrate apply --database-name=default
env:
HASURA_ENDPOINT: ${{ secrets.HASURA_ENDPOINT }}
HASURA_ADMIN_SECRET: ${{ secrets.HASURA_ADMIN_SECRET }}
HASURA_WORKDIR: migrations
hasura-metadata:
needs: hasura-migration
name: Hasura metadata
runs-on: ubuntu-latest
environment: staging
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Apply hasura metadata
uses: tibotiber/hasura-action@master
with:
args: metadata apply
env:
HASURA_ENDPOINT: ${{ secrets.HASURA_ENDPOINT }}
HASURA_ADMIN_SECRET: ${{ secrets.HASURA_ADMIN_SECRET }}
HASURA_WORKDIR: migrations