-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (54 loc) · 1.63 KB
/
providers-sequelize-terraform.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
52
53
54
name: Sequelize + Terraform
on:
push:
branches:
- master
paths:
- .github/workflows/providers-sequelize-terraform.yaml
- 'providers/sequelize-terraform/migrations/*'
pull_request:
paths:
- 'providers/sequelize-terraform/migrations/*'
- .github/workflows/providers-sequelize-terraform.yaml
# Permissions to write comments on the pull request.
permissions:
contents: read
pull-requests: write
jobs:
atlas:
services:
# Spin up a mysql:8 container to be used as the dev-database for analysis.
postgres:
image: postgres:15
env:
POSTGRES_DB: dev
POSTGRES_PASSWORD: pass
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-start-period 10s
--health-timeout 5s
--health-retries 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ariga/setup-atlas@v0
with:
cloud-token: ${{ secrets.ATLAS_CLOUD_TOKEN }}
- uses: ariga/atlas-action/migrate/lint@v1
with:
dir: 'file://providers/sequelize-terraform/migrations'
dir-name: 'sequelize'
dev-url: postgres://postgres:pass@localhost:5432/dev?sslmode=disable
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: ariga/atlas-action/migrate/push@v1
if: github.ref == 'refs/heads/master'
with:
dir: 'file://atlashcl/gcp-secrets/migrations'
dir-name: 'sequelize'
dev-url: postgres://postgres:pass@localhost:5432/dev?sslmode=disable