Skip to content

Feat/demo #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b0b3ea1
Update release-action.yml
rafajpr Jul 10, 2025
57e5915
Update release-action.yml
rafajpr Jul 10, 2025
66f14d2
Update release-action.yml
rafajpr Jul 10, 2025
baabac1
Update sql-review-action.yml
rafajpr Jul 10, 2025
b0583f6
Update release-action.yml
rafajpr Jul 10, 2025
45c203c
Update sql-review-action.yml
rafajpr Jul 10, 2025
4675736
Create 202503131500_create_table_t1_ddl.sql
rafajpr Jul 10, 2025
348a433
Merge pull request #5 from rafajpr/feat/test-migration
rafajpr Jul 10, 2025
26b7890
Update release-action.yml
rafajpr Jul 10, 2025
db2d654
Delete migrations-semver/202503131500_create_table_t1_ddl.sql
rafajpr Jul 10, 2025
a58f49f
Create 202503131500_create_table_t1_ddl.sql
rafajpr Jul 10, 2025
7238eb8
Delete migrations-semver/1.0.0_init.sql
rafajpr Jul 10, 2025
d568c8c
Update release-action.yml
rafajpr Jul 10, 2025
82132a8
Update sql-review-action.yml
rafajpr Jul 10, 2025
4108c83
Create 1.0.0_init.sql
rafajpr Jul 10, 2025
841e549
Update release-action.yml
rafajpr Jul 10, 2025
ee0b362
Update sql-review-action.yml
rafajpr Jul 10, 2025
2516004
Delete migrations-semver/202503131500_create_table_t1_ddl.sql
rafajpr Jul 10, 2025
dcf9151
Merge pull request #7 from rafajpr/feat/test-migration
rafajpr Jul 10, 2025
1e5bc3a
Update release-action.yml
rafajpr Jul 11, 2025
3276c74
Update sql-review-action.yml
rafajpr Jul 11, 2025
f893d7a
Update sql-review-action.yml
rafajpr Jul 11, 2025
261d7fd
Update release-action.yml
rafajpr Jul 11, 2025
bae3f5d
Update release-action.yml
rafajpr Jul 11, 2025
9eb2566
Create 1.3.6_init_2.sql
rafajpr Jul 11, 2025
f699cdb
feat: remove old migrations
Jul 11, 2025
f083875
feat: add migration
Jul 11, 2025
7baa481
feat: test changing sql file name
Jul 11, 2025
29ef589
feat: test
Jul 11, 2025
583a413
feat: change version of migrations
Jul 11, 2025
9c137d4
feat: test
Jul 11, 2025
e437196
Merge pull request #9 from rafajpr/feat/change-migrations-names
rafajpr Jul 11, 2025
0fd748c
feat: create 1.4 migration versions
Jul 11, 2025
949f909
fix: remove duplicate version
Jul 11, 2025
6c88432
Merge pull request #10 from rafajpr/feat/create_new_migration_versions
rafajpr Jul 11, 2025
b05c0ba
feat: add new user
Jul 11, 2025
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
12 changes: 6 additions & 6 deletions .github/workflows/release-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:
- "migrations-semver/*.sql"

env:
BYTEBASE_URL: https://demo.bytebase.com
BYTEBASE_SERVICE_ACCOUNT: api@service.bytebase.com
BYTEBASE_URL: https://71f0441fc48c.ngrok-free.app
BYTEBASE_SERVICE_ACCOUNT: bunge-poc@service.bytebase.com
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{ secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET }}
BYTEBASE_PROJECT: "projects/hr"
BYTEBASE_PROJECT: "projects/gitops-poc"

jobs:
build:
Expand All @@ -27,7 +27,7 @@ jobs:
echo "Upload done!"
create-rollout:
needs: build
runs-on: ubuntu-latest # use self-hosted machines if your Bytebase runs in internal networks.
runs-on: ubuntu-latest
container:
image: docker://bytebase/bytebase-action:latest
outputs:
Expand All @@ -37,7 +37,7 @@ jobs:
uses: actions/checkout@v4
- name: rollout
env:
BYTEBASE_TARGETS: "instances/test-sample-instance/databases/hr_test,instances/prod-sample-instance/databases/hr_prod"
BYTEBASE_TARGETS: "instances/dev/databases/dev,instances/prod/databases/prod"
FILE_PATTERN: "migrations-semver/*.sql"
BYTEBASE_OUTPUT: ${{ runner.temp }}/bytebase-metadata.json
run: |
Expand All @@ -49,7 +49,7 @@ jobs:
echo "plan=$PLAN" >> $GITHUB_OUTPUT
deploy-to-test:
needs: create-rollout
runs-on: ubuntu-latest # use self-hosted machines if your Bytebase runs in internal networks.
runs-on: ubuntu-latest
environment: test
container:
image: docker://bytebase/bytebase-action:latest
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/sql-review-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ on:
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.
pull-requests: write
runs-on: ubuntu-latest
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: api@service.bytebase.com
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BYTEBASE_URL: https://71f0441fc48c.ngrok-free.app
BYTEBASE_SERVICE_ACCOUNT: bunge-poc@service.bytebase.com
BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{ secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET }}
BYTEBASE_PROJECT: "projects/hr"
BYTEBASE_TARGETS: "instances/prod-sample-instance/databases/hr_prod"
BYTEBASE_PROJECT: "projects/gitops-poc"
BYTEBASE_TARGETS: "instances/dev/databases/dev"
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 }}
3 changes: 0 additions & 3 deletions migrations-semver/1.13.0_phone.sql

This file was deleted.

1 change: 0 additions & 1 deletion migrations-semver/1.3.5_nickname.sql

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ INSERT INTO users (
id, name, email
) VALUES (
1, 'me', '[email protected]'
);
);
5 changes: 5 additions & 0 deletions migrations-semver/1.4.3_add_user_dml.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
INSERT INTO users (
id, name, email
) VALUES (
2, 'me2', '[email protected]'
);