SQL migrations action

The sql-migrations-validator GitHub Action

A GitHub Action for auto-recognizing new Data Definition Language (DDL) SQL files submitted in a pull request. The files will be sent to be analyzed and derive insights at Metis Data platform.
You can find the GitHub Action in the GitHub Marketplace.

Usage

Add the following step to your workflow:
- name: Analyze migrations
uses: metis-data/sql-migrations-[email protected]
with:
from: ${{ github.event.pull_request.base.sha }}
to: ${{ github.event.pull_request.head.sha }}
github_token: ${{ github.token }}
metis_api_key: <Your Api Key>
For example, you can run it in a GitHub Actions workflow job:
on:
pull_request:
types: [opened, reopened, edited, synchronize, ready_for_review]
jobs:
migrations:
name: Analyze new migrations
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Compare migrations
uses: metis-data/sql-migrations-[email protected]
with:
from: ${{ github.event.pull_request.base.sha }}
to: ${{ github.event.pull_request.head.sha }}
github_token: ${{ github.token }}
metis_api_key: <Your Api Key>

Parameters

  • from: Base sha to be compared
  • to: Branch sha to be compared with
  • github_token: Auto generated workflow GitHub token
  • metis_api_key: Metis Api Key generated at Metis

Issues

If you would like to report a potential issue please use Issues