Skip to content

Commit 279d7bd

Browse files
authored
Merge pull request #1 from RainbowDashy/test-action
2 parents cfb2f4c + f6e2a4c commit 279d7bd

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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"

migrations/202504171429_1.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATE TABLE IF NOT EXISTS wer (
2+
id int
3+
);

migrations/202504171526_2.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATE TABLE IF NOT EXISTS oijoir (
2+
id int
3+
);

0 commit comments

Comments
 (0)