Skip to content

Setup Redgate Flyway

Actions
Set up Flyway and add the command-line to the PATH
v3.2.0
Latest
Verified creator
Star (9)

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

Setup Flyway

Flyway

Deploy database changes with confidence

CI End-to-End Tests CodeQL analysis License checks


The setup-flyway action installs the Redgate Flyway CLI into your GitHub Actions workflow, enabling automated database migrations, version control for your schema, and seamless CI/CD integration. Supports 50+ databases including PostgreSQL, MySQL, SQL Server, and Oracle.

Use this in conjunction with flyway-actions to unlock powerful CLI capabilities for scaling database delivery.

Usage

  • version - The version of Flyway CLI to set up. Can specify latest, an exact version, or a semver version. Default: latest.
  • edition - Required. The Flyway edition to use. Must be one of community, teams, or enterprise.
  • i-agree-to-the-eula - Required. Set to true to confirm you consent to the Redgate EULA.
  • architecture - The hardware architecture version of the Flyway CLI. Can specify x64, arm64, or java. The Java version will require Java 17 or higher to be installed, preferably using actions/setup-java. Default: the architecture of the runner.
  • platform - The operating system version of the Flyway CLI. Can specify linux, linux-alpine, macos, or windows. This setting is ignored when java is selected for the architecture. Default: the platform of the runner.
  • email - A Redgate email to be used in conjunction with the token parameter to configure a personal access token (PAT). Used to authenticate Flyway to use either Teams or Enterprise.
  • token - A personal access token (PAT) to be used in conjunction with the email parameter. This is used to license Flyway to access Teams or Enterprise features.
  • max-auth-attempts - The maximum number of times to attempt authenticating Flyway. Default: 2.

Note

The Flyway CLI supports the windows-x64, linux-x64, macosx-arm64, macosx-x64, and linux-alpine-x64 platforms. For all other platforms, the Java version of the Flyway CLI should be used.

Basic Configuration

Typical setup

- uses: red-gate/setup-flyway@v3
  with:
    edition: community
    i-agree-to-the-eula: true

Java version

- uses: actions/setup-java@v4
  with:
    distribution: 'zulu' # See 'Supported distributions' for available options
    java-version: '21'
- uses: red-gate/setup-flyway@v3
  with:
    edition: community
    i-agree-to-the-eula: true
    architecture: 'java'

Authentication

- uses: red-gate/setup-flyway@v3
  with:
    edition: enterprise
    i-agree-to-the-eula: true
    email: ${{ secrets.FLYWAY_EMAIL }}
    token: ${{ secrets.FLYWAY_TOKEN }}

Supported version syntax

The version input supports an exact version or a version range using SemVer notation:

  • major versions: 9, 10, 11, 12
  • more specific versions: 10.11, 10.12.0, 10.13.x
  • the current version: latest

Enterprise Features

Authenticate with a Redgate personal access token to unlock powerful CLI capabilities for scaling database delivery:

  • Code analysis & policies — enforce best practices with a built-in policy library and custom rules via flyway check -code
  • Drift detection — identify uncontrolled database changes with flyway check -drift
  • Change reports — preview migration impact with flyway check -changes
  • Undo migrations — auto-generate and run rollback scripts to recover from failed deployments
  • State-based deployments — auto-generate migration scripts by comparing schemas
  • Secrets manager integration — connect to external secrets managers for secure credential handling

Learn more about Flyway editions →

License

The scripts and documentation in this project are released under the MIT License.

Contributions

Contributions are welcome! See Code of Conduct

Breaking Changes

See Breaking Changes for a list of breaking changes.

Security Policy

Find a security issue? Please review our Security Policy.

Support

For support, please see the Support Policy.

Setup Redgate Flyway is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Set up Flyway and add the command-line to the PATH
v3.2.0
Latest

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

Setup Redgate Flyway is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.