Skip to content

Commit

Permalink
ghcr workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
HauwaHakimi committed Feb 7, 2024
1 parent 4c90e21 commit a2ab541
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/publish-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,24 @@ on:

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
name: Push Docker image to GHCR
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
- name: Log in to Github Container Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: governmentdigitalservice/ee-request-aws-account
images: ghcr.io/alphagov/re-request-an-aws-account/governmentdigitalservice/ee-request-aws-account
tags: |
type=sha,enable=true,priority=100,prefix=sha-,suffix=,format=short
type=raw,value=latest,enable={{is_default_branch}}
Expand Down

0 comments on commit a2ab541

Please sign in to comment.