Skip to content

Commit

Permalink
ensure image variable is sent to github output
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 committed Jun 18, 2024
1 parent b7c83ea commit 548224a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,9 @@ jobs:
id: base_exists
run: |
base_image="gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/oss:${{ inputs.base-image-md5 }}-${{ inputs.image }}"
echo "image=${base_image}"
echo "image=${base_image}" >> $GITHUB_OUTPUT
if docker manifest inspect ${base_image}; then
echo "exists=0" >> $GITHUB_OUTPUT
else
echo "exists=1" >> $GITHUB_OUTPUT
echo "exists=true" >> $GITHUB_OUTPUT
fi
if: ${{ ! inputs.forked-workflow }}

Expand All @@ -145,7 +143,7 @@ jobs:
build-args: |
BUILD_OS=${{ inputs.image }}
IC_VERSION=${{ inputs.tag }}
if: ${{ ! inputs.forked-workflow && steps.base_exists.outputs.exists != 0 }}
if: ${{ ! inputs.forked-workflow && steps.base_exists.outputs.exists != 'true' }}

- name: Get short tag
id: tag
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/build-plus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,9 @@ jobs:
id: base_exists
run: |
base_image="gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic-base/plus:${{ inputs.base-image-md5 }}-${{ inputs.image }}${{ steps.nap_modules.outputs.name != '' && format('-{0}', steps.nap_modules.outputs.name) || '' }}${{ contains(inputs.image, 'v5') && '-v5' || '' }}"
echo "image=${base_image}"
echo "image=${base_image}" >> $GITHUB_OUTPUT
if docker manifest inspect ${base_image}; then
echo "exists=0" >> $GITHUB_OUTPUT
else
echo "exists=1" >> $GITHUB_OUTPUT
echo "exists=true" >> $GITHUB_OUTPUT
fi
if: ${{ ! inputs.forked-workflow }}

Expand All @@ -182,7 +180,7 @@ jobs:
"nginx-repo.crt=${{ inputs.nap_modules != '' && secrets.NGINX_AP_CRT || secrets.NGINX_CRT }}"
"nginx-repo.key=${{ inputs.nap_modules != '' && secrets.NGINX_AP_KEY || secrets.NGINX_KEY }}"
${{ inputs.nap_modules != '' && contains(inputs.image, 'ubi') && format('"rhel_license={0}"', secrets.RHEL_LICENSE) || '' }}
if: ${{ ! inputs.forked-workflow && steps.base_exists.outputs.exists != 0 }}
if: ${{ ! inputs.forked-workflow && steps.base_exists.outputs.exists != 'true' }}

- name: Build Plus Docker image
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
Expand Down

0 comments on commit 548224a

Please sign in to comment.