From cc65cf1f8e48ef46e3b6972462802225bdef36a2 Mon Sep 17 00:00:00 2001 From: frank zhu Date: Thu, 8 Aug 2024 15:23:34 -0500 Subject: [PATCH] change conditional --- .github/workflows/build-publish-develop-pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-publish-develop-pr.yml b/.github/workflows/build-publish-develop-pr.yml index 92a606b423c..47f4c98e989 100644 --- a/.github/workflows/build-publish-develop-pr.yml +++ b/.github/workflows/build-publish-develop-pr.yml @@ -21,14 +21,14 @@ jobs: id: get-image-tag run: | short_sha=$(git rev-parse --short HEAD) - if [[ ${{ github.event }} == 'pull_request' ]]; then + if [[ ${{ github.event_name }} == 'push' ]]; then + echo "image-tag=develop-${short_sha}" >> $GITHUB_OUTPUT + else if [[ ${{ github.head_ref }} == 'release/'* ]]; then echo "image-tag=release-${short_sha}" >> $GITHUB_OUTPUT else echo "image-tag=pr-${{ github.event.number }}-${short_sha}" >> $GITHUB_OUTPUT fi - else - echo "image-tag=develop-${short_sha}" >> $GITHUB_OUTPUT fi - name: Configure aws credentials