diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 9dd9e49..00effec 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -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: