Skip to content

Commit b906d27

Browse files
committed
Fix overwrite condition check for composite action.
Signed-off-by: Humair Khan <[email protected]>
1 parent fa6cc96 commit b906d27

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/actions/build/action.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ runs:
3737
# Case 4: >1 tags were created, but the most recent one was never deleted (same as case 3, but the latest tag does not have "end_ts".
3838
- name: Check if Image already exists
3939
shell: bash
40-
if: ${{ inputs.OVERWRITE }} == "false"
40+
if: inputs.OVERWRITE == 'false'
4141
env:
4242
IMAGE: quay.io/${{ env.QUAY_ORG }}/${{ inputs.IMAGE_REPO }}:${{ env.TARGET_IMAGE_TAG }}
4343
run: |
44+
echo ${{ inputs.OVERWRITE }}
45+
4446
tags=$(curl --request GET 'https://quay.io/api/v1/repository/${{ env.QUAY_ORG }}/${{ inputs.IMAGE_REPO }}/tag/?specificTag=${{ env.TARGET_IMAGE_TAG }}')
45-
echo $tags | yq .tags - | yq 'sort_by(.start_ts) | reverse' - -P | yq .[0].end_ts -
4647
latest_tag_has_end_ts=$(echo $tags | yq .tags - | yq 'sort_by(.start_ts) | reverse' - -P | yq .[0].end_ts -)
47-
echo $latest_tag_has_end_ts
4848
notempty=$(echo ${tags} | yq .tags - | yq any)
4949
5050
# Image only exists if there is a tag that does not have "end_ts" (i.e. it is still present).

0 commit comments

Comments
 (0)