From dd11249835c5c9a66eaf56a85f566b0f44699400 Mon Sep 17 00:00:00 2001 From: Tano Date: Fri, 12 Dec 2025 15:17:13 +0800 Subject: [PATCH 1/2] Add conditional checks for Docker actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.使用 'if' 条件,确保此步骤仅在推送到 'main' 分支时运行,避免了 'enable' 属性的错误。2.确保只有在标签生成步骤成功运行时(即在 main 分支 push 时),才执行构建和推送。 3.docker image推送时增加latest标签 --- .../versioned_docs/version-2.4.4/best-practice/deployment.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/versioned_docs/version-2.4.4/best-practice/deployment.mdx b/website/versioned_docs/version-2.4.4/best-practice/deployment.mdx index 8c33520b4f7f..69e974f1d38f 100644 --- a/website/versioned_docs/version-2.4.4/best-practice/deployment.mdx +++ b/website/versioned_docs/version-2.4.4/best-practice/deployment.mdx @@ -209,6 +209,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Generate Tags + if: github.ref == 'refs/heads/main' && github.event_name == 'push' uses: docker/metadata-action@v4 id: metadata with: @@ -219,8 +220,10 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=sha + type=raw,value=latest - name: Build and Publish + if: steps.metadata.outputs.tags != '' uses: docker/build-push-action@v4 with: context: . From 2024237da5a29dce4a98331918eb7bee676b6aee Mon Sep 17 00:00:00 2001 From: Tano Date: Fri, 12 Dec 2025 23:10:41 +0800 Subject: [PATCH 2/2] Simplify Docker action conditions in deployment Removed conditional checks for generating tags and building/publishing. --- .../versioned_docs/version-2.4.4/best-practice/deployment.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/website/versioned_docs/version-2.4.4/best-practice/deployment.mdx b/website/versioned_docs/version-2.4.4/best-practice/deployment.mdx index 69e974f1d38f..43a72c61472c 100644 --- a/website/versioned_docs/version-2.4.4/best-practice/deployment.mdx +++ b/website/versioned_docs/version-2.4.4/best-practice/deployment.mdx @@ -209,7 +209,6 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Generate Tags - if: github.ref == 'refs/heads/main' && github.event_name == 'push' uses: docker/metadata-action@v4 id: metadata with: @@ -223,7 +222,6 @@ jobs: type=raw,value=latest - name: Build and Publish - if: steps.metadata.outputs.tags != '' uses: docker/build-push-action@v4 with: context: .