Also push the Docker image to the GitHub Container Registry.

This commit is contained in:
Jocelyn Le Sage 2025-02-07 15:14:46 -05:00
parent 27ea856429
commit cd8e96dc18

View File

@ -62,6 +62,7 @@ jobs:
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
TAGS="$TAGS,${{ env.DOCKER_IMAGE_NAME }}:latest"
fi
TAGS="$TAGS,$(echo $TAGS | tr ',' '\n' | sed 's|^|ghcr.io/|' | tr '\n' ',')"
# Determine the release type.
if [[ $GITHUB_REF =~ refs/tags/* ]]; then
IS_RELEASE=yes
@ -106,6 +107,14 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
if: ${{ steps.prep.outputs.is_release == 'yes' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with: