File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,14 +74,16 @@ jobs:
7474 - name : Check if perform release
7575 id : perform_release
7676 run : |
77- if [[ "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == "refs/heads/develop" || "${GITHUB_REF}" == "refs/heads/aks-dev"]]; then
78- echo "PERFORM_RELEASE=true" >> $GITHUB_ENV
77+ PERFORM_RELEASE=false
78+ if [[ "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == "refs/heads/develop" || "${GITHUB_REF}" == "refs/heads/aks-dev" ]]; then
79+ PERFORM_RELEASE=true
80+ elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then
81+ PERFORM_RELEASE=true
7982 elif [[ "${{ inputs.performRelease }}" == "true" ]]; then
80- echo "PERFORM_RELEASE=true" >> $GITHUB_ENV
81- else
82- echo "PERFORM_RELEASE=false" >> $GITHUB_ENV
83+ PERFORM_RELEASE=true
8384 fi
84- echo "Perform release condition: PERFORM_RELEASE"
85+ echo "PERFORM_RELEASE=${PERFORM_RELEASE}" >> $GITHUB_ENV
86+ echo "Perform release: ${PERFORM_RELEASE}"
8587
8688 - name : Setup Docker Buildx
8789 if : env.PERFORM_RELEASE == 'true'
Original file line number Diff line number Diff line change @@ -53,14 +53,16 @@ jobs:
5353 - name : Check if perform release
5454 id : perform_release
5555 run : |
56+ PERFORM_RELEASE=false
5657 if [[ "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == "refs/heads/develop" || "${GITHUB_REF}" == "refs/heads/aks-dev" ]]; then
57- echo "PERFORM_RELEASE=true" >> $GITHUB_ENV
58+ PERFORM_RELEASE=true
59+ elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then
60+ PERFORM_RELEASE=true
5861 elif [[ "${{ inputs.performRelease }}" == "true" ]]; then
59- echo "PERFORM_RELEASE=true" >> $GITHUB_ENV
60- else
61- echo "PERFORM_RELEASE=false" >> $GITHUB_ENV
62+ PERFORM_RELEASE=true
6263 fi
63- echo "Perform release condition: PERFORM_RELEASE"
64+ echo "PERFORM_RELEASE=${PERFORM_RELEASE}" >> $GITHUB_ENV
65+ echo "Perform release: ${PERFORM_RELEASE}"
6466
6567 - name : Lowercase Docker Image Name
6668 run : |
@@ -103,6 +105,6 @@ jobs:
103105 uses : docker/build-push-action@v6
104106 with :
105107 context : .
106- push : ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' }}
108+ push : ${{ env.PERFORM_RELEASE }}
107109 tags : ${{ steps.meta.outputs.tags }}
108110 labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -69,16 +69,16 @@ jobs:
6969 - name : Check if perform release
7070 id : perform_release
7171 run : |
72+ PERFORM_RELEASE=false
7273 if [[ "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == "refs/heads/develop" || "${GITHUB_REF}" == "refs/heads/aks-dev" ]]; then
73- echo " PERFORM_RELEASE=true" >> $GITHUB_ENV
74- elif [[ "${GITHUB_EVENT_NAME}" == "push" && ( "${ GITHUB_REF}" == " refs/heads/main" || "${GITHUB_REF}" == refs/ tags/* ) ]]; then
75- echo " PERFORM_RELEASE=true" >> $GITHUB_ENV
74+ PERFORM_RELEASE=true
75+ elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then
76+ PERFORM_RELEASE=true
7677 elif [[ "${{ inputs.performRelease }}" == "true" ]]; then
77- echo "PERFORM_RELEASE=true" >> $GITHUB_ENV
78- else
79- echo "PERFORM_RELEASE=false" >> $GITHUB_ENV
78+ PERFORM_RELEASE=true
8079 fi
81- echo "Perform release condition: PERFORM_RELEASE"
80+ echo "PERFORM_RELEASE=${PERFORM_RELEASE}" >> $GITHUB_ENV
81+ echo "Perform release: ${PERFORM_RELEASE}"
8282
8383 - name : Lowercase Docker Image Name
8484 run : |
You can’t perform that action at this time.
0 commit comments