File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,14 +107,16 @@ jobs:
107107 - name : Check if perform release
108108 id : perform_release
109109 run : |
110- if [[ "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == "refs/heads/develop" || "${GITHUB_REF}" == "refs/heads/aks-dev"]]; then
111- echo "PERFORM_RELEASE=true" >> $GITHUB_ENV
110+ PERFORM_RELEASE=false
111+ if [[ "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == "refs/heads/develop" || "${GITHUB_REF}" == "refs/heads/aks-dev" ]]; then
112+ PERFORM_RELEASE=true
113+ elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then
114+ PERFORM_RELEASE=true
112115 elif [[ "${{ inputs.performRelease }}" == "true" ]]; then
113- echo "PERFORM_RELEASE=true" >> $GITHUB_ENV
114- else
115- echo "PERFORM_RELEASE=false" >> $GITHUB_ENV
116+ PERFORM_RELEASE=true
116117 fi
117- echo "Perform release condition: PERFORM_RELEASE"
118+ echo "PERFORM_RELEASE=${PERFORM_RELEASE}" >> $GITHUB_ENV
119+ echo "Perform release: ${PERFORM_RELEASE}"
118120
119121 - name : Setup Docker Buildx
120122 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