GitHub Actions CI workflow for validating Flyway migration script names to ensure they follow the naming convention.
This Github action generated from dbanty/rust-github-action-template.
Flyway's file convention is clearly specified. This action checks that all files conform to the flyway file convention.
Flyway: Naming Patterns Matter | Redgate
Make sure to write path. path means the migration file path.
Do not start with /. It should be in the form of 'db/migration' instead of '/db/migration'.
To use this GitHub Actions workflow in your repository.
Create a YAML file (e.g., .github/workflows/flyway-naming-check.yml
) with the following content:
name: Flyway Naming Check
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: flyway-naming-checker
uses: seonghun-dev/flyway-naming-checker@v0.1.0
with:
path: 'db/migartion' # Adjust the path to match your migration script location
This script verifies that all files in the current folder match flyway naming convention.
