Skip to content

[ADD] - github actions for flyway migrations #13

[ADD] - github actions for flyway migrations

[ADD] - github actions for flyway migrations #13

Workflow file for this run

name: 'Migrate database schema'
on:
push:
branches:
- main
jobs:
migrate-database:
name: Run Flyway migrations
runs-on: ubuntu-latest
env:
SUPABASE_HOST: ${{ secrets.SUPABASE_HOST }}
SUPABASE_PORT: ${{ secrets.SUPABASE_PORT }}
SUPABASE_USER: ${{ secrets.SUPABASE_USER }}
SUPABASE_DB: ${{ secrets.SUPABASE_DB }}
steps:
- uses: actions/checkout@v2
- run: >-
docker run --rm
--volume ${{ github.workspace }}/src/main/resources/db.migration:/flyway/sql:ro
flyway/flyway:7.12.1-alpine
-url="jdbc:postgresql://aws-0-eu-central-1.pooler.supabase.com:5432/postgres?user=postgres.cyvmmlkvpqakdrcxdbbc&password=${{ secrets.SUPABASE_DB }}"
migrate