-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (46 loc) · 1.29 KB
/
atlashcl-gcp-secrets.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
name: Atlas
on:
push:
branches:
- master
paths:
- .github/workflows/atlashcl-gcp-secrets.yaml
- 'atlashcl/gcp-secrets/migrations/*'
pull_request:
paths:
- 'atlashcl/gcp-secrets/migrations/*'
- .github/workflows/atlashcl-gcp-secrets.yaml
# Permissions to write comments on the pull request.
permissions:
contents: read
pull-requests: write
jobs:
atlas:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- run: |
gcloud config get-value project
- uses: ariga/setup-atlas@v0
- uses: ariga/atlas-action/migrate/lint@v1
with:
dir: 'file://migrations'
dir-name: 'gcp-secrets'
dev-url: 'sqlite://dev?mode=memory'
config: file://atlas.hcl
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: ariga/atlas-action/migrate/push@v1
if: github.ref == 'refs/heads/master'
with:
dir: 'file://migrations'
dir-name: 'gcp-secrets'
dev-url: 'sqlite://dev?mode=memory'
config: file://atlas.hcl