From afd4d7c7761c0c36d90e2d6375b6ab9598e383c6 Mon Sep 17 00:00:00 2001 From: samzong Date: Thu, 17 Apr 2025 09:03:30 +0800 Subject: [PATCH] fix: update ci configuration for docker image tagging Signed-off-by: samzong --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2513e79..cbfdcbc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -40,7 +40,7 @@ jobs: with: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: projecthami/hami-webui-fe-oss:${{ steps.branch-names.outputs.current_branch || steps.branch-names.outputs.tag }} + tags: projecthami/hami-webui-fe-oss:${{ steps.branch-names.outputs.tag || steps.branch-names.outputs.current_branch == 'main' && 'main' || format('pr-{0}', github.run_number) }} build-and-push-backend: name: Build and Push Backend Image @@ -70,4 +70,4 @@ jobs: context: ./server platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: projecthami/hami-webui-be-oss:${{ steps.branch-names.outputs.current_branch || steps.branch-names.outputs.tag }} + tags: projecthami/hami-webui-be-oss:${{ steps.branch-names.outputs.tag || steps.branch-names.outputs.current_branch == 'main' && 'main' || format('pr-{0}', github.run_number) }}