4646 - name : Output update main branch version
4747 id : update-main
4848 run : |
49- IFS=.- read -r MAJOR MINOR PATCH SNAPSHOT<<<"${{ steps.release-version.outputs.RELEASE_VERSION }}"
49+ IFS=.- read -r MAJOR MINOR PATCH SNAPSHOT<<<"${{ steps.release-version.outputs.release_version }}"
5050 if [[ $PATCH == '0' && -z $SNAPSHOT ]];
5151 then
5252 echo "update_main_branch_version=true" >> $GITHUB_OUTPUT
6565 exit 1
6666 fi
6767
68- if [[ "${{steps.release-version.outputs.RELEASE_VERSION }}" =~ SNAPSHOT ]]; then
68+ if [[ "${{steps.release-version.outputs.release_version }}" =~ SNAPSHOT ]]; then
6969 echo "This workflow can not be executed for SNAPSHOT versions."
7070 exit 1
7171 fi
8989 permissions :
9090 contents : write
9191 packages : write
92- if : github.event.pull_request.merged == true && needs.release-version .outputs.RELEASE_VERSION
92+ if : needs.validation .outputs.release_version
9393
9494 strategy :
9595 fail-fast : false
@@ -101,13 +101,10 @@ jobs:
101101
102102 steps :
103103 - uses : actions/checkout@v5
104- - name : Export RELEASE_VERSION env
105- run : |
106- echo "RELEASE_VERSION=${{ needs.release-version.outputs.release_version }}" >> $GITHUB_ENV
107104 - uses : ./.github/actions/publish-docker-image
108105 name : Publish ${{ matrix.variant.img }}
109106 with :
110- docker_tag : ${{ env.RELEASE_VERSION }}
107+ docker_tag : ${{ needs.validation.outputs.release_version }}
111108 rootDir : ${{ matrix.variant.dir }}/${{ matrix.variant.img }}
112109 imagename : ${{ matrix.variant.img }}
113110 docker_user : ${{ secrets.DOCKER_HUB_USER }}
@@ -123,11 +120,8 @@ jobs:
123120 contents : write
124121 pages : write
125122
126- if : needs.release-version .outputs.release_version
123+ if : needs.validation .outputs.release_version
127124 steps :
128- - name : Export RELEASE_VERSION env
129- run : |
130- echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV
131125 - uses : actions/checkout@v5
132126 with :
133127 fetch-depth : 0
@@ -152,7 +146,7 @@ jobs:
152146
153147 # Commit and push to gh-pages
154148 git add index.yaml helm-charts
155- git commit -s -m "Release ${{ env.RELEASE_VERSION }}"
149+ git commit -s -m "Release ${{ needs.validation.outputs.release_version }}"
156150
157151 git push origin gh-pages
158152
@@ -163,11 +157,8 @@ jobs:
163157 runs-on : ubuntu-latest
164158 permissions :
165159 contents : write
166- if : needs.release-version .outputs.release_version
160+ if : needs.validation .outputs.release_version
167161 steps :
168- - name : Export RELEASE_VERSION env
169- run : |
170- echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV
171162 - uses : actions/checkout@v5
172163 with :
173164 # 0 to fetch the full history due to upcoming merge of releases into main branch
@@ -185,13 +176,13 @@ jobs:
185176 git tag
186177
187178 # Create & push tag
188- git tag --force ${{ env.RELEASE_VERSION }}
189- git push --force origin ${{ env.RELEASE_VERSION }}
179+ git tag --force ${{ needs.validation.outputs.release_version }}
180+ git push --force origin ${{ needs.validation.outputs.release_version }}
190181 - name : Create GitHub Release
191182 uses : ncipollo/release-action@v1
192183 with :
193184 generateReleaseNotes : true
194- tag : ${{ env.RELEASE_VERSION }}
185+ tag : ${{ needs.validation.outputs.release_version }}
195186 token : ${{ secrets.GITHUB_TOKEN }}
196187 makeLatest : ${{ needs.validation.outputs.update_main_branch_version == 'true' }}
197188 removeArtifacts : true
0 commit comments