|
5 | 5 | branches:
|
6 | 6 | - main
|
7 | 7 | paths:
|
8 | | - - "migrations/*.sql" |
| 8 | + - "migrations-semver/*.sql" |
9 | 9 |
|
10 | 10 | jobs:
|
11 | 11 | check-release-on-prod:
|
12 | 12 | permissions:
|
13 | 13 | pull-requests: write # write permission required to allow the action writes the check results to the comment.
|
14 | 14 | runs-on: ubuntu-latest # use self-hosted machines if your Bytebase runs in internal networks.
|
| 15 | + container: |
| 16 | + image: docker://bytebase/bytebase-action:latest |
15 | 17 | steps:
|
16 | 18 | - name: Checkout
|
17 | 19 | uses: actions/checkout@v4
|
18 | 20 | - name: Check release
|
19 | | - uses: docker://bytebase/bytebase-action:latest |
20 | 21 | env:
|
21 | 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # set GITHUB_TOKEN because the 'Check release' step needs it to comment the pull request with check results.
|
22 | 23 | BYTEBASE_URL: https://demo.bytebase.com
|
23 | 24 | BYTEBASE_SERVICE_ACCOUNT: ci@service.bytebase.com
|
24 | | - BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET}} |
| 25 | + BYTEBASE_SERVICE_ACCOUNT_SECRET: "bbs_iqysPHMqhNpG4rQ5SFEJ" |
25 | 26 | BYTEBASE_PROJECT: "projects/project-sample"
|
26 | 27 | BYTEBASE_TARGETS: "instances/prod-sample-instance/databases/hr_prod"
|
27 | | - FILE_PATTERN: "migrations/*.sql" |
28 | | - with: |
29 | | - entrypoint: bytebase-action |
30 | | - args: check --url ${{ env.BYTEBASE_URL }} --service-account ${{ env.BYTEBASE_SERVICE_ACCOUNT }} --project ${{ env.BYTEBASE_PROJECT }} --targets ${{ env.BYTEBASE_TARGETS }} --file-pattern ${{ env.FILE_PATTERN }} |
| 28 | + FILE_PATTERN: "migrations-semver/*.sql" |
| 29 | + run: | |
| 30 | + 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 }} |
0 commit comments