Skip to content

Commit

Permalink
feat: added GHCR
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielg2020 committed Apr 15, 2024
1 parent bbb5cbf commit 29e8311
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- push-images-to-GHCR

permissions:
contents: read
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ env:
AWS_OIDC_ROLE: ${{ inputs.push && vars.TF_OIDC_ROLE || vars.TF_OIDC_READONLY_ROLE }}
ECR_REGISTRY: 245185850403.dkr.ecr.eu-west-1.amazonaws.com
AWS_REGION: eu-west-1
GHCR: ghcr.io/dvsa/dvsa-docker-images

jobs:
build:
Expand All @@ -48,7 +49,9 @@ jobs:
id: mutable-meta
uses: docker/metadata-action@v5
with:
images: ${{ env.ECR_REGISTRY }}/${{ inputs.repository }}
images: |
${{ env.ECR_REGISTRY }}/${{ inputs.repository }}
${{ env.GHCR }}/${{ inputs.repository }}
tags: |
type=raw,value=latest
type=semver,enable=${{ inputs.is-release }},pattern={{major}}.{{minor}},value=${{ inputs.version }}
Expand All @@ -58,7 +61,9 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.ECR_REGISTRY }}/${{ inputs.repository }}
images: |
${{ env.ECR_REGISTRY }}/${{ inputs.repository }}
${{ env.GHCR }}/${{ inputs.repository }}
tags: |
type=raw,value=latest
type=semver,enable=${{ inputs.is-release }},pattern={{major}}.{{minor}},value=${{ inputs.version }}
Expand Down

0 comments on commit 29e8311

Please sign in to comment.