Skip to content

Commit

Permalink
fix: ghcr images need to publish to pact-foundation / dockerhub image…
Browse files Browse the repository at this point in the history
…s to pactfoundation

GitHub container registries must contain a matching NAMESPACE to the GitHub user or org.

This worked on my personal fork, as my GH and Docker username are the same, however pact-foundation uses a hyphen-less NAMESPACE when publishing to docker.io

https://hub.docker.com/u/pactfoundation

We therefore need to set the org name to pact-foundation when publishing to ghcr.
  • Loading branch information
YOU54F committed Feb 26, 2024
1 parent 6c8bf19 commit 09104d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script/release-workflow/docker-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ push() {
push_ghcr() {
docker buildx build --platform=linux/amd64,linux/arm64,linux/arm \
--output=type=image,push=true \
-t ghcr.io/${DOCKER_IMAGE_ORG_AND_NAME}:$1 .
-t ghcr.io/${DOCKER_IMAGE_ORG_AND_NAME/pactfoundation/pact-foundation}:$1 .
}

if [ -n "${MAJOR_TAG:-}" ]; then
Expand All @@ -27,4 +27,4 @@ push_ghcr ${TAG}
if [ "${PUSH_TO_LATEST}" != "false" ]; then
push latest
push_ghcr latest
fi
fi

0 comments on commit 09104d2

Please sign in to comment.