A GitHub Action to automatically download, install, and validate the Flyway CLI on your workflow runner.
Supports both Linux and Windows environments.
- Downloads the specified Flyway CLI version (or latest)
- Handles extraction and setup for both Linux (
tar.gz) and Windows (zip) - Adds Flyway to the system
PATH - Validates the installation by running
flyway --versionorflyway -v
- name: Install Flyway CLI
uses: sanderstad/[email protected]
with:
version: 'latest' # or specify a version, e.g. '11.8.2'| Name | Description | Required | Default |
|---|---|---|---|
| version | Flyway CLI version to install | false | latest |
jobs:
flyway-setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Flyway CLI
uses: sanderstad/[email protected]
with:
version: 'latest'- Detects OS and sets the correct download filename.
- Downloads the Flyway CLI archive from the official source.
- Extracts the archive to a local directory.
- Adds Flyway to PATH so it can be used in subsequent workflow steps.
- Validates the installation by running the version command.
- No custom Flyway parameters are set; only the CLI is installed and validated.
- If you encounter errors about unknown Flyway parameters, ensure you are not passing custom environment variables as Flyway CLI arguments.
MIT