Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore(ci): add build release image workflow (#399)

qsliu2017b49631b76091
diff --git a/.github/workflows/build-release-image.yml b/.github/workflows/build-release-image.yml
new file mode 100644
index 0000000000..ab4ddfaaea
--- /dev/null
+++ b/.github/workflows/build-release-image.yml
@@ -0,0 +1,27 @@
+name: build release image and push to docker hub
+
+on:
+ push:
+ tags:
+ # Run on pushing version tag like `1.0.0`
+ - '*.*.*'
+
+jobs:
+ build-release-image:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+ - name: Login to DockerHub
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Build and push
+ uses: docker/build-push-action@v2
+ with:
+ push: true
+ # Extract the version from the tag
+ tags: bytebase/bytebase:${{ github.ref_name }}
+ - name: Image digest
+ run: echo "Successfully pushed bytebase/bytebase:${{ github.ref_name }} ${{ steps.docker_build.outputs.digest }}"