Skip to content

Commit

Permalink
Update GitHub Actions workflow to use GitHub Container Registry for D…
Browse files Browse the repository at this point in the history
…ocker image login and tagging
  • Loading branch information
ndonathan committed Nov 2, 2024
1 parent b34ad12 commit 1752005
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/posh-rest:latest
tags: ghcr.io/${{ github.repository_owner }}/posh-rest:latest

0 comments on commit 1752005

Please sign in to comment.