Skip to content

Commit

Permalink
Pass packages write permissions to build image workflow
Browse files Browse the repository at this point in the history
This is required by the build and push reusable workflow to push images to
GitHub Packages.
  • Loading branch information
theseanything committed Jul 8, 2024
1 parent fbd4020 commit 8a6223c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Deploy

run-name: Deploy ${{ inputs.gitRef || github.ref_name }} to ${{ inputs.environment || 'integration' }}
run-name: Deploy ${{ inputs.gitRef || github.event.release.tag_name }} to ${{ inputs.environment || 'integration' }}

on:
workflow_dispatch:
Expand All @@ -9,7 +9,6 @@ on:
description: 'Commit, tag or branch name to deploy'
required: true
type: string
default: 'main'
environment:
description: 'Environment to deploy to'
required: true
Expand All @@ -24,15 +23,15 @@ on:

jobs:
build-and-publish-image:
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref_name, 'v')
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'v')
name: Build and publish image
uses: alphagov/govuk-infrastructure/.github/workflows/build-and-push-multiarch-image.yml@main
with:
ecrRepositoryName: content-store
gitRef: ${{ inputs.gitRef || github.ref_name }}
gitRef: ${{ inputs.gitRef || github.event.release.tag_name }}
permissions:
id-token: write
contents: read
packages: write
trigger-deploy:
name: Trigger deploy to ${{ inputs.environment || 'integration' }}
needs: build-and-publish-image
Expand Down

0 comments on commit 8a6223c

Please sign in to comment.