Skip to content

chore: test semver

chore: test semver #8

name: SQL review on pull request using bytebase-action image
on:
pull_request:
branches:
- main
paths:
- "migrations-semver/*.sql"
jobs:
check-release-on-prod:
permissions:
pull-requests: write # write permission required to allow the action writes the check results to the comment.
runs-on: ubuntu-latest # use self-hosted machines if your Bytebase runs in internal networks.
container:
image: docker://bytebase/bytebase-action:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # set GITHUB_TOKEN because the 'Check release' step needs it to comment the pull request with check results.
BYTEBASE_URL: https://demo.bytebase.com
BYTEBASE_SERVICE_ACCOUNT: [email protected]
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET}}
BYTEBASE_PROJECT: "projects/project-sample"
BYTEBASE_TARGETS: "instances/prod-sample-instance/databases/hr_prod"
FILE_PATTERN: "migrations-semver/*.sql"
run: |
bytebase-action check --url=${{ env.BYTEBASE_URL }} --service-account=${{ env.BYTEBASE_SERVICE_ACCOUNT }} --service-account-secret=${{ env.BYTEBASE_SERVICE_ACCOUNT_SECRET }} --project=${{ env.BYTEBASE_PROJECT }} --targets=${{ env.BYTEBASE_TARGETS }} --file-pattern=${{ env.FILE_PATTERN }}