Skip to content

Flyway prod runner + postgres bumped to 16 (#5) #4

Flyway prod runner + postgres bumped to 16 (#5)

Flyway prod runner + postgres bumped to 16 (#5) #4

Workflow file for this run

name: DB Migration
on:
push:
branches: [ main ]
paths:
- db/**
pull_request:
branches: [ main ]
paths:
- db/**
workflow_dispatch:
jobs:
validate-migrations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 'Test flyway migration scripts'
working-directory: ./db
run: |
./run_migrations_test.sh
apply-migrations:
runs-on: ubuntu-latest
environment: production
if: github.ref == 'refs/heads/main'
needs: validate-migrations
steps:
- uses: actions/checkout@v4
- name: Run migration
uses: docker://flyway/flyway:10-alpine
env:
FLYWAY_URL: ${{ secrets.DB_JDBC_URL }}
FLYWAY_USER: ${{ secrets.DB_FLYWAY_USER }}
FLYWAY_PASSWORD: ${{ secrets.DB_FLYWAY_PASSWORD }}
FLYWAY_LOCATIONS: filesystem:./db/migrations
FLYWAY_VALIDATE_MIGRATION_NAMING: true