Skip to content

atlashcl/gcp-secrets: example for working with gcp secrets from withi… #4

atlashcl/gcp-secrets: example for working with gcp secrets from withi…

atlashcl/gcp-secrets: example for working with gcp secrets from withi… #4

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://atlashcl/gcp-secrets/migrations'
dir-name: 'gcp-secrets'
dev-url: 'sqlite://dev?mode=memory'
config: file://atlashcl/gcp-secrets/atlas.hcl
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: 'gcp-secrets'
dev-url: 'sqlite://dev?mode=memory'
config: file://atlashcl/gcp-secrets/atlas.hcl