From 410c561b277fec94245466fe0ec4e78844b6e091 Mon Sep 17 00:00:00 2001 From: Shweta chavan Date: Wed, 18 Sep 2024 10:43:10 +0530 Subject: [PATCH] testtag --- .../hostplumber-multiarch-build-and-push.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/hostplumber-multiarch-build-and-push.yml b/.github/workflows/hostplumber-multiarch-build-and-push.yml index 708e8a2b..cbe8f36f 100644 --- a/.github/workflows/hostplumber-multiarch-build-and-push.yml +++ b/.github/workflows/hostplumber-multiarch-build-and-push.yml @@ -26,9 +26,13 @@ jobs: run: echo ${{ github.run_number }} - name: Set env - run: - echo "TAG=$(echo "${{ env.BRANCH }}" | tr -d /)" >> $GITHUB_ENV - + run: + if startsWith(github.head_ref, 'v') + echo "TAG=$(echo "${{ env.BRANCH }}") >> $GITHUB_ENV + else + echo "TAG=$(echo "${{ env.BRANCH }}" | tr -d /)"-${{ github.run_number }} >> $GITHUB_ENV + fi + - uses: actions/checkout@v3 - name: Setup Docker BuildX @@ -52,7 +56,7 @@ jobs: uses: docker/build-push-action@v3 with: context: hostplumber - tags: quay.io/platform9/hostplumber:${{ env.TAG }}-${{ github.run_number }} + tags: quay.io/platform9/hostplumber:${{ env.TAG }} push: ${{ env.PUSH }} build-args: ${{ env.BUILD_ARGS}} platforms: ${{ env.PLATFORMS }}