ci: fix container build always attempting to push (#12810)
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -77,7 +77,7 @@ jobs:
|
|||||||
id: push
|
id: push
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: ${{ steps.ev.outputs.shouldPush == 'true' }}
|
||||||
secrets: |
|
secrets: |
|
||||||
GEOIPUPDATE_ACCOUNT_ID=${{ secrets.GEOIPUPDATE_ACCOUNT_ID }}
|
GEOIPUPDATE_ACCOUNT_ID=${{ secrets.GEOIPUPDATE_ACCOUNT_ID }}
|
||||||
GEOIPUPDATE_LICENSE_KEY=${{ secrets.GEOIPUPDATE_LICENSE_KEY }}
|
GEOIPUPDATE_LICENSE_KEY=${{ secrets.GEOIPUPDATE_LICENSE_KEY }}
|
||||||
@ -89,6 +89,7 @@ jobs:
|
|||||||
cache-to: ${{ steps.ev.outputs.cacheTo }}
|
cache-to: ${{ steps.ev.outputs.cacheTo }}
|
||||||
- uses: actions/attest-build-provenance@v2
|
- uses: actions/attest-build-provenance@v2
|
||||||
id: attest
|
id: attest
|
||||||
|
if: ${{ steps.ev.outputs.shouldPush == 'true' }}
|
||||||
with:
|
with:
|
||||||
subject-name: ${{ steps.ev.outputs.attestImageNames }}
|
subject-name: ${{ steps.ev.outputs.attestImageNames }}
|
||||||
subject-digest: ${{ steps.push.outputs.digest }}
|
subject-digest: ${{ steps.push.outputs.digest }}
|
||||||
|
@ -46,6 +46,7 @@ jobs:
|
|||||||
- build-server-arm64
|
- build-server-arm64
|
||||||
outputs:
|
outputs:
|
||||||
tags: ${{ steps.ev.outputs.imageTagsJSON }}
|
tags: ${{ steps.ev.outputs.imageTagsJSON }}
|
||||||
|
shouldPush: ${{ steps.ev.outputs.shouldPush }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: prepare variables
|
- name: prepare variables
|
||||||
@ -57,6 +58,7 @@ jobs:
|
|||||||
image-name: ${{ inputs.image_name }}
|
image-name: ${{ inputs.image_name }}
|
||||||
merge-server:
|
merge-server:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ needs.get-tags.outputs.shouldPush == 'true' }}
|
||||||
needs:
|
needs:
|
||||||
- get-tags
|
- get-tags
|
||||||
- build-server-amd64
|
- build-server-amd64
|
||||||
|
Reference in New Issue
Block a user