Skip to content

Capture latest ent schema state in migration file + applying atlas migration on staging environment #1

Capture latest ent schema state in migration file + applying atlas migration on staging environment

Capture latest ent schema state in migration file + applying atlas migration on staging environment #1

Workflow file for this run

name: Atlas CI
on:
# Run whenever code is changed in the main branch,
# change this to your root branch.
# push:
# branches:
# - main
# Run on PRs where something changed under the `ent/migrate/migrations/` directory.
pull_request:
paths:
- 'ent/migrate/migrations/*'
jobs:
lint:
services:
# Spin up a postgres:10 container to be used as the dev-database for analysis.
postgres:
image: postgres:10
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: pass
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0 # Mandatory unless "latest" is set below.
- uses: ariga/atlas-action@v0
with:
dir: ent/migrate/migrations
dir-format: golang-migrate # Or: atlas, goose, dbmate
dev-url: postgres://postgres:pass@localhost:5432/test?sslmode=disable