Skip to content

Commit

Permalink
fix for building images in fork workflow (#5225)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabelf5 committed Mar 8, 2024
1 parent 455bcdf commit 631beae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/actions/smoke-tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,23 @@ runs:
token_format: access_token
workload_identity_provider: ${{ inputs.gcr-workload-identity-secret }}
service_account: ${{ inputs.gcr-service-account-secret }}
if: ${{ ! inputs.forked-workflow }}
if: ${{ inputs.forked-workflow == 'false' }}

- name: Login to GCR
uses: docker/login-action@v3
with:
registry: gcr.io
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
if: ${{ ! inputs.forked-workflow }}
if: ${{ inputs.forked-workflow == 'false' }}

- name: Build ${{ inputs.image }} Container
uses: docker/build-push-action@v3
with:
file: build/Dockerfile
context: "."
cache-from: type=gha,scope=${{ inputs.image }}${{ contains(inputs.marker, 'dos') && '-dos' || '' }}${{ contains(inputs.marker, 'appprotect') && '-nap' || '' }}
target: goreleaser${{ inputs.forked-workflow && '' || '-prebuilt' }}
target: goreleaser${{ inputs.forked-workflow == 'false' && '-prebuilt' || '' }}
tags: "docker.io/nginx/${{ steps.ingress-type.outputs.name }}:${{ steps.ingress-type.outputs.tag }}"
load: true
pull: true
Expand Down Expand Up @@ -138,7 +138,7 @@ runs:
tags: ${{ inputs.test-image }}
pull: true
load: true
if: ${{ inputs.forked-workflow }}
if: ${{ inputs.forked-workflow == 'true' }}

- name: Run Smoke Tests
run: |
Expand Down

0 comments on commit 631beae

Please sign in to comment.