Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/sql-review-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,25 @@ 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.
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
image: docker://bytebase/bytebase-action:3.19.0
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: api@service.bytebase.com # set service account via environment variable
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{ secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET }} # set service account secret via environment variable
BYTEBASE_PROJECT: "projects/hr"
BYTEBASE_TARGETS: "instances/prod-sample-instance/databases/hr_prod"
FILE_PATTERN: "migrations-semver/*.sql"
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://fab2-82-26-72-60.ngrok-free.app/
BYTEBASE_SERVICE_ACCOUNT: cicd_srv@service.bytebase.com # set service account via environment variable
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{ secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET }} # set service account secret via environment variable
BYTEBASE_PROJECT: "projects/db333"
BYTEBASE_TARGETS: "instances/dbdbdb/databases/db_1"
FILE_PATTERN: "migrations-semver/*.sql"
run: |
bytebase-action check --url=${{ env.BYTEBASE_URL }} --project=${{ env.BYTEBASE_PROJECT }} --targets=${{ env.BYTEBASE_TARGETS }} --file-pattern=${{ env.FILE_PATTERN }}
Loading