You can run the Docker image directly without using this action.
- uses: docker://flyway/flyway:9
env:
FLYWAY_URL: jdbc:postgresql://postgres:5432/db
FLYWAY_USER: user
FLYWAY_PASSWORD: password
FLYWAY_LOCATIONS: filesystem:./sql
FLYWAY_VALIDATE_MIGRATION_NAMING: true
This action runs Flyway v9 to migrate database. It aims to migrate database for testing in workflows.
name: Main
on:
- push
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_DB: db
POSTGRES_USER: user
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: joshuaavalon/[email protected]
with:
url: jdbc:postgresql://postgres:5432/db
user: user
password: password
- run: echo 'testing'
Currently, it supports url
, user
, password
, initSql
and locations
. locations
are default to filesystem:./sql
.
Extra configurations can be passed via environment variables.
- uses: joshuaavalon/[email protected]
with:
url: jdbc:postgresql://postgres:5432/db
user: user
password: password
env:
FLYWAY_VALIDATE_MIGRATION_NAMING: true
For details, please check out Flyway documentation.