This is an automated email from the ASF dual-hosted git repository.

LinkinStars pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/answer.git


The following commit(s) were added to refs/heads/test by this push:
     new ef247af7 fix(build): streamline Docker image build process in CI 
configuration
ef247af7 is described below

commit ef247af7a7f4ee848c14bf640b0d3a4af6c386c7
Author: LinkinStars <[email protected]>
AuthorDate: Wed Jul 8 10:31:16 2026 +0800

    fix(build): streamline Docker image build process in CI configuration
---
 .github/workflows/build-image-for-test.yml | 41 ++++++++++++------------------
 1 file changed, 16 insertions(+), 25 deletions(-)

diff --git a/.github/workflows/build-image-for-test.yml 
b/.github/workflows/build-image-for-test.yml
index b90a1ac4..a650f06e 100644
--- a/.github/workflows/build-image-for-test.yml
+++ b/.github/workflows/build-image-for-test.yml
@@ -30,32 +30,23 @@ jobs:
     - name: Checkout
       uses: actions/checkout@v4
 
-    - name: Docker meta
-      id: meta
-      uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # 
v5.10.0
-      with:
-        images: apache/answer
-        tags: |
-          type=raw,value=test
-
-    - name: Set up QEMU
-      uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 
# v3.6.0
+    - name: Login to DockerHub
+      run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login --username 
"${{ secrets.DOCKERHUB_USER }}" --password-stdin
 
     - name: Set up Docker Buildx
-      uses: 
docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
-
-    - name: Login to DockerHub
-      uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # 
v3.7.0
-      with:
-        username: ${{ secrets.DOCKERHUB_USER }}
-        password: ${{ secrets.DOCKERHUB_TOKEN }}
+      run: |
+        docker buildx create --name answer-builder --driver docker-container 
--use
+        docker buildx inspect --bootstrap
 
     - name: Build and push
-      uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 
# v6.19.2
-      with:
-        context: .
-        file: ./Dockerfile
-        platforms: linux/amd64
-        push: true
-        tags: ${{ steps.meta.outputs.tags }}
-        labels: ${{ steps.meta.outputs.labels }}
+      run: |
+        BUILD_DATE="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
+        docker buildx build \
+          --file ./Dockerfile \
+          --platform linux/amd64 \
+          --push \
+          --tag apache/answer:test \
+          --label org.opencontainers.image.created="${BUILD_DATE}" \
+          --label org.opencontainers.image.revision="${GITHUB_SHA}" \
+          --label 
org.opencontainers.image.source="https://github.com/${GITHUB_REPOSITORY}"; \
+          .

Reply via email to