Skip to content

Commit

Permalink
Merge pull request #1565 from alphagov/docker-build-secrets
Browse files Browse the repository at this point in the history
Allow secrets to be set when building image
  • Loading branch information
jackbot authored Jan 14, 2025
2 parents 738cbd5 + 8a766de commit 80e4ffa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-and-push-multiarch-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ on:
required: false
type: string
default: ${{ github.sha }}
secrets:
BUILD_SECRETS:
description: "Allows adding secrets to the docker build task - https://docs.docker.com/build/ci/github-actions/secrets"
required: false
outputs:
imageTag:
description: "The image tag for the built image"
Expand Down Expand Up @@ -91,6 +95,7 @@ jobs:
outputs: type=image,name=ghcr.io/${{ github.repository_owner }}/govuk/${{ inputs.imageName }},push-by-digest=true,name-canonical=true,push=true
cache-from: type=gha,scope=build-${{ inputs.imageName }}-${{ matrix.arch }}
cache-to: type=gha,scope=build-${{ inputs.imageName }}-${{ matrix.arch }},mode=max
secrets: ${{ secrets.BUILD_SECRETS }}

- id: export-digests
env:
Expand Down

0 comments on commit 80e4ffa

Please sign in to comment.