Skip to content

Commit 68f81de

Browse files
authored
chore(release): fix syntax for 'if env.REF_NAME_SHORT starts with next-' (RHIDP-8256) (#3195)
Signed-off-by: Nick Boldt <[email protected]>
1 parent 137507d commit 68f81de

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/next-build-image.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
- name: Build and Push with Buildx (for :next builds, 14d expiry)
9999
uses: ./.github/actions/docker-build
100100
id: build-next
101-
if: ${{ env.REF_NAME_SHORT == 'next' || env.REF_NAME_SHORT == 'next-'* }}
101+
if: ${{ env.REF_NAME_SHORT == 'next' || startsWith(env.REF_NAME_SHORT,'next-') }}
102102
with:
103103
registry: ${{ env.REGISTRY }}
104104
username: ${{ secrets.QUAY_USERNAME }}
@@ -114,7 +114,7 @@ jobs:
114114
- name: Build and Push with Buildx (for releases, 183d expiry)
115115
uses: ./.github/actions/docker-build
116116
id: build-release
117-
if: ${{ env.REF_NAME_SHORT != 'next' && env.REF_NAME_SHORT != 'next-'* }}
117+
if: ${{ env.REF_NAME_SHORT != 'next' && !startsWith(env.REF_NAME_SHORT,'next-') }}
118118
with:
119119
registry: ${{ env.REGISTRY }}
120120
username: ${{ secrets.QUAY_USERNAME }}
@@ -129,15 +129,15 @@ jobs:
129129

130130
- name: Export digest (for :next builds)
131131
id: export-digest-next
132-
if: ${{ env.REF_NAME_SHORT == 'next' || env.REF_NAME_SHORT == 'next-'* }}
132+
if: ${{ env.REF_NAME_SHORT == 'next' || startsWith(env.REF_NAME_SHORT,'next-') }}
133133
run: |
134134
mkdir -p /tmp/digests
135135
digest="${{ steps.build-next.outputs.digest }}"
136136
touch "/tmp/digests/${digest#sha256:}"
137137
138138
- name: Export digest (for releases)
139139
id: export-digest-release
140-
if: ${{ env.REF_NAME_SHORT != 'next' && env.REF_NAME_SHORT != 'next-'* }}
140+
if: ${{ env.REF_NAME_SHORT != 'next' && !startsWith(env.REF_NAME_SHORT,'next-') }}
141141
run: |
142142
mkdir -p /tmp/digests
143143
digest="${{ steps.build-release.outputs.digest }}"
@@ -190,7 +190,7 @@ jobs:
190190

191191
- name: Set container metadata (for :next builds, 14d expiry)
192192
id: meta-next
193-
if: ${{ env.REF_NAME_SHORT == 'next' || env.REF_NAME_SHORT == 'next-'* }}
193+
if: ${{ env.REF_NAME_SHORT == 'next' || startsWith(env.REF_NAME_SHORT,'next-') }}
194194
uses: docker/metadata-action@v5
195195
with:
196196
images: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}
@@ -202,7 +202,7 @@ jobs:
202202
203203
- name: Set container metadata (for releases, 183d expiry)
204204
id: meta-release
205-
if: ${{ env.REF_NAME_SHORT != 'next' && env.REF_NAME_SHORT != 'next-'* }}
205+
if: ${{ env.REF_NAME_SHORT != 'next' && !startsWith(env.REF_NAME_SHORT,'next-') }}
206206
uses: docker/metadata-action@v5
207207
with:
208208
images: ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}
@@ -229,12 +229,12 @@ jobs:
229229
230230
- name: Inspect image (for :next builds)
231231
id: inspect-next
232-
if: ${{ env.REF_NAME_SHORT == 'next' || env.REF_NAME_SHORT == 'next-'* }}
232+
if: ${{ env.REF_NAME_SHORT == 'next' || startsWith(env.REF_NAME_SHORT,'next-') }}
233233
run: |
234234
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:${{ steps.meta-next.outputs.version }}
235235
236236
- name: Inspect image (for releases)
237237
id: inspect-release
238-
if: ${{ env.REF_NAME_SHORT != 'next' && env.REF_NAME_SHORT != 'next-'* }}
238+
if: ${{ env.REF_NAME_SHORT != 'next' && !startsWith(env.REF_NAME_SHORT,'next-') }}
239239
run: |
240240
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.REGISTRY_IMAGE }}:${{ steps.meta-release.outputs.version }}

0 commit comments

Comments
 (0)