File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -299,17 +299,19 @@ jobs:
299299 fetch-depth : 0
300300 - name : Get version from branch
301301 run : |
302- GITHUB_REF="${{ github.ref }}"
303- [[ -z "$GITHUB_REF" ]] && exit 1 # Fail if ref is unset
304- echo "PACKAGE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
302+ echo "package_version=${GITHUB_REF#refs/heads/release/}" >> $GITHUB_ENV
303+ - name : Fail if version is unset
304+ if : ${{ env.package_version == '' }}
305+ run : |
306+ exit 1
305307 - name : Buildah build
306308 id : build-image
307309 uses : redhat-actions/buildah-build@v2
308310 with :
309311 image : ${{ github.event.repository.name }}
310312 build-args : |
311313 GUIDELLM_BUILD_TYPE=candidate
312- tags : ${{ env.package_version }}~rc
314+ tags : ${{ env.package_version= }}~rc
313315 containerfiles : |
314316 ./Containerfile
315317 - name : Push To ghcr.io
Original file line number Diff line number Diff line change @@ -298,9 +298,11 @@ jobs:
298298 fetch-depth : 0
299299 - name : Get version from branch
300300 run : |
301- GITHUB_REF="${{ github.ref }}"
302- [[ -z "$GITHUB_REF" ]] && exit 1 # Fail if ref is unset
303- echo "PACKAGE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
301+ echo "package_version=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
302+ - name : Fail if version is unset
303+ if : ${{ env.package_version == '' }}
304+ run : |
305+ exit 1
304306 - name : Buildah build
305307 id : build-image
306308 uses : redhat-actions/buildah-build@v2
You can’t perform that action at this time.
0 commit comments