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
The following commit(s) were added to refs/heads/main by this push:
new 02df1c00e [CALCITE-7518] Use GitHub actions to build Avatica Docker
images
02df1c00e is described below
commit 02df1c00e28a8189277a2b459e8506dfa6360bf4
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..528dbafc1
--- /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@v6
+ 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@v4
+ - name: Log in to Docker Hub
+ uses: docker/login-action@v4
+ with:
+ username: ${{ secrets.DOCKERHUB_USER }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Build and tag Docker image
+ uses: docker/build-push-action@v7
+ 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@v6
+ 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@v4
+ - name: Log in to Docker Hub
+ uses: docker/login-action@v4
+ with:
+ username: ${{ secrets.DOCKERHUB_USER }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Build and tag Docker image
+ uses: docker/build-push-action@v7
+ 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