From 6d9e56c37ed0df907a141b6ffca6f89516125aec Mon Sep 17 00:00:00 2001 From: Sean Rankine Date: Tue, 9 Jul 2024 14:34:08 +0100 Subject: [PATCH] Add govuk/ namespace for images in ghcr.io As our GitHub org is shared with other programmes, we namespace packages by programme name. --- .github/workflows/build-and-push-image.yml | 2 +- .github/workflows/build-and-push-multiarch-image.yml | 4 ++-- terraform/deployments/ecr/main.tf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-push-image.yml b/.github/workflows/build-and-push-image.yml index d5b5bd3e7..ab23b3c17 100644 --- a/.github/workflows/build-and-push-image.yml +++ b/.github/workflows/build-and-push-image.yml @@ -71,7 +71,7 @@ jobs: with: images: | ${{ steps.login-ecr.outputs.registry }}/${{ inputs.ecrRepositoryName }} - ghcr.io/${{ github.repository_owner }}/${{ inputs.ecrRepositoryName }} + ghcr.io/${{ github.repository_owner }}/govuk/${{ inputs.ecrRepositoryName }} tags: | type=raw,priority=500,value=${{ inputs.gitRef }},enable=${{ startsWith(inputs.gitRef, 'v') }} type=raw,priority=400,value=${{ steps.local-head.outputs.sha }},enable=${{ !startsWith(inputs.gitRef, 'v') }} diff --git a/.github/workflows/build-and-push-multiarch-image.yml b/.github/workflows/build-and-push-multiarch-image.yml index eb2c15249..9421c9d4e 100644 --- a/.github/workflows/build-and-push-multiarch-image.yml +++ b/.github/workflows/build-and-push-multiarch-image.yml @@ -81,7 +81,7 @@ jobs: with: images: | ${{ steps.login-ecr.outputs.registry }}/${{ inputs.ecrRepositoryName }} - ghcr.io/${{ github.repository_owner }}/${{ inputs.ecrRepositoryName }} + ghcr.io/${{ github.repository_owner }}/govuk/${{ inputs.ecrRepositoryName }} labels: | org.opencontainers.image.vendor=GDS tags: | @@ -166,7 +166,7 @@ jobs: with: images: | ${{ steps.login-ecr.outputs.registry }}/${{ inputs.ecrRepositoryName }} - ghcr.io/${{ github.repository_owner }}/${{ inputs.ecrRepositoryName }} + ghcr.io/${{ github.repository_owner }}/govuk/${{ inputs.ecrRepositoryName }} labels: | org.opencontainers.image.vendor=GDS tags: | diff --git a/terraform/deployments/ecr/main.tf b/terraform/deployments/ecr/main.tf index de1e671c2..a75374fe3 100644 --- a/terraform/deployments/ecr/main.tf +++ b/terraform/deployments/ecr/main.tf @@ -80,7 +80,7 @@ resource "aws_ecr_repository" "repositories" { resource "aws_ecr_repository" "github_repositories" { for_each = toset(local.repositories) - name = "github/alphagov/${each.key}" + name = "github/alphagov/govuk/${each.key}" image_tag_mutability = "MUTABLE" # To support a movable `latest` for developer convenience. image_scanning_configuration { scan_on_push = true } }