Skip to content

Commit

Permalink
Push container images to GHCR instead of Dockerhub (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-c authored Oct 21, 2024
1 parent 0e2b0a2 commit 53f852e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/docker-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout git commit
uses: actions/checkout@master
uses: actions/checkout@main

- name: Publish to Dockerhub registry
- name: Publish to GitHub Container Registry
# todo: pin to hash
uses: elgohr/Publish-Docker-Github-Action@3.04
uses: elgohr/Publish-Docker-Github-Action@main
with:
# https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
name: ${{ github.repository }}
# configured at repo settings/secrets
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io

# GitHub actor
username: ${{ github.actor }}

# GitHub access token
password: ${{ secrets.GITHUB_TOKEN }}

# create docker image tags to match git tags
tag_names: true

0 comments on commit 53f852e

Please sign in to comment.