This is an automated email from the ASF dual-hosted git repository. F21 pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git
commit 832dd34cb8fa7591cf340fe6e00aa1eb81e9ac39 Author: Francis Chuang <[email protected]> AuthorDate: Tue May 12 11:40:42 2026 +1000 [CALCITE-7518] Use GitHub actions to build Avatica Docker images --- .github/workflows/build-docker-hub-images.yml | 84 +++++++++++++++++++++++++++ docker/src/main/dockerhub/hooks/build | 18 ------ docker/src/main/dockerhub/hooks/post_push | 21 ------- 3 files changed, 84 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build-docker-hub-images.yml b/.github/workflows/build-docker-hub-images.yml new file mode 100644 index 000000000..f8e6a67f7 --- /dev/null +++ b/.github/workflows/build-docker-hub-images.yml @@ -0,0 +1,84 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +name: Build Docker Hub Images + +on: + push: + tags: + - rel/avatica-[0-9]+.[0-9]+.[0-9]+ # Trigger only when the tag matches rel/avatica-X.Y.Z + +jobs: + build-avatica-image: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Generate Docker image tags + id: meta + uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf + with: + images: ${{ github.repository }} + flavor: | + latest=false + tags: | + type=match,pattern=rel\/avatica\-(\d+.\d+.\d+)$,group=1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd + - name: Log in to Docker Hub + uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and tag Docker image + uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f + with: + build-args: | + AVATICA_VERSION=${{ steps.meta.outputs.tag-names }} + context: docker/src/main/dockerhub + push: true + tags: ${{ steps.meta.outputs.tags }} + build-avatica-hypersql-image: + needs: build-avatica-image + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Generate Docker image tags + id: meta + uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf + with: + images: ${{ github.repository }}-hypersql + flavor: | + latest=false + tags: | + type=match,pattern=rel\/avatica\-(\d+.\d+.\d+)$,group=1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd + - name: Log in to Docker Hub + uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and tag Docker image + uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f + with: + build-args: | + AVATICA_VERSION=${{ steps.meta.outputs.tag-names }} + context: docker/src/main/dockerhub + file: docker/src/main/dockerhub/Dockerfile.hypersql + push: true + tags: ${{ steps.meta.outputs.tags }} diff --git a/docker/src/main/dockerhub/hooks/build b/docker/src/main/dockerhub/hooks/build deleted file mode 100644 index e193f3c9f..000000000 --- a/docker/src/main/dockerhub/hooks/build +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to you under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -docker build --build-arg AVATICA_VERSION="$DOCKER_TAG" -t $IMAGE_NAME . diff --git a/docker/src/main/dockerhub/hooks/post_push b/docker/src/main/dockerhub/hooks/post_push deleted file mode 100644 index affc99192..000000000 --- a/docker/src/main/dockerhub/hooks/post_push +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to you under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -HSQLDB_IMAGE_NAME=apache/calcite-avatica-hypersql:$DOCKER_TAG - -docker build --build-arg AVATICA_VERSION="$DOCKER_TAG" -f Dockerfile.hypersql -t $HSQLDB_IMAGE_NAME . -docker push $HSQLDB_IMAGE_NAME
