File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Rollout using bytebase-action image
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ - test-cd-action-1
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout
14
+ uses : actions/checkout@v4
15
+ - name : Build app and upload
16
+ run : |
17
+ echo "Building..."
18
+ echo "Build done!"
19
+ echo "Uploading..."
20
+ echo "Upload done!"
21
+ deploy-to-all :
22
+ needs : build
23
+ runs-on : ubuntu-latest # use self-hosted machines if your Bytebase runs in internal networks.
24
+ outputs :
25
+ bytebase-plan : ${{ steps.create-plan.outputs.plan }}
26
+ deployment-required : ${{ steps.create-plan.outputs.deployment-required }}
27
+ steps :
28
+ - name : Checkout
29
+ uses : actions/checkout@v4
30
+ - name : rollout
31
+ uses : docker://bytebase/bytebase-action:latest
32
+ env :
33
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ BYTEBASE_URL : https://demo.bytebase.com
35
+ BYTEBASE_SERVICE_ACCOUNT :
[email protected]
36
+ BYTEBASE_SERVICE_ACCOUNT_SECRET : ${{secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET}}
37
+ BYTEBASE_PROJECT : " projects/project-sample"
38
+ BYTEBASE_TARGETS : " instances/prod-sample-instance/databases/hr_prod"
39
+ BYTEBASE_TARGET_STAGE : environments/test
40
+ FILE_PATTERN : " migrations/*.sql"
41
+ with :
42
+ entrypoint : bytebase-action
43
+ args : rollout --url=${{ env.BYTEBASE_URL }} --service-account=${{ env.BYTEBASE_SERVICE_ACCOUNT }} --service-account-secret=${{ env.BYTEBASE_SERVICE_ACCOUNT_SECRET }} --project=${{ env.BYTEBASE_PROJECT }} --file-pattern=${{ env.FILE_PATTERN }} --targets=${{ env.BYTEBASE_TARGETS }} --target-stage=${{ env.BYTEBASE_TARGET_STAGE }} --output="$HOME/bytebase-metadata.json"
44
+ - name : Check output
45
+ run : |
46
+ echo "Output: ${{ runner.temp }}/bytebase-metadata.json"
47
+ cat ${{ runner.temp }}/bytebase-metadata.json
Original file line number Diff line number Diff line change 1
- name : Build and push release image
1
+ name : Rollout
2
2
3
3
on :
4
4
push :
You can’t perform that action at this time.
0 commit comments