A wrapper for golang-migrate cli.
See action.yml for more detailed information.
path
- relative path to your migration folderdatabase
- a command to connect to the databasecommand
- migrate cli command to runprefetch
- Number of migrations to load in advance before executing (default 10)lockTimeout
- Allow N seconds to acquire database lock (default 15)verbose
- Print verbose loggingversion
- Print version
name: run migration
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
name: Checkout
uses: actions/checkout@v3
- name: Migrate
uses: vovavc/[email protected]
with:
path: ./backend/migrate
database: postgres://username:password@localhost:5432/database_name?sslmode=disable
command: up
name: run migration
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
name: Checkout
uses: actions/checkout@v3
- name: Migrate
uses: vovavc/[email protected]
with:
path: ./backend/migrate
database: mysql://${{ secrets.DB_USER }}:${{ secrets.DB_PASS }}@tcp(${{ secrets.DB_HOST }})/${{ secrets.DB_NAME }}?tls=${{ secrets.DB_TLS }}
command: up
Pull requests are welcome at VoVaVc/migrate-github-action
The scripts and documentation in this project are released under the MIT License