SQL migrations 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.
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>
from
: Base sha to be comparedto
: Branch sha to be compared withgithub_token
: Auto generated workflow GitHub token
Last modified 1mo ago