File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : SQL review on pull request using bytebase-action image
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - main
7
+ paths :
8
+ - " migrations/*.sql"
9
+
10
+ jobs :
11
+ check-release-on-prod :
12
+ permissions :
13
+ pull-requests : write # write permission required to allow the action writes the check results to the comment.
14
+ runs-on : ubuntu-latest # use self-hosted machines if your Bytebase runs in internal networks.
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v4
18
+ - name : Check release
19
+ uses : docker://bytebase/bytebase-action:latest
20
+ env :
21
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # set GITHUB_TOKEN because the 'Check release' step needs it to comment the pull request with check results.
22
+ BYTEBASE_URL : https://demo.bytebase.com
23
+ BYTEBASE_SERVICE_ACCOUNT :
[email protected]
24
+ BYTEBASE_SERVICE_ACCOUNT_SECRET : ${{secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET}}
25
+ BYTEBASE_PROJECT : " projects/project-sample"
26
+ BYTEBASE_TARGETS : " instances/prod-sample-instance/databases/hr_prod"
27
+ FILE_PATTERN : " migrations/*.sql"
Original file line number Diff line number Diff line change
1
+ CREATE TABLE IF NOT EXISTS wer (
2
+ id int
3
+ );
Original file line number Diff line number Diff line change
1
+ CREATE TABLE IF NOT EXISTS oijoir (
2
+ id int
3
+ );
You can’t perform that action at this time.
0 commit comments