Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Update publish.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
jlubken authored Dec 2, 2021
1 parent 5f3bdd9 commit 9a667a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ IMAGES=$(docker inspect --format='{{.Image}}' $(docker ps -aq))
echo "IMAGES: $IMAGES"
for IMAGE in $IMAGES; do
echo "IMAGE: $IMAGE"
NAME=$(docker inspect --format '{{index .Config.Labels "name"}}' $IMAGE)
TAG="ghcr.io/${{ github.repository }}/$NAME:$VERSION"
LATEST="ghcr.io/${{ github.repository }}/$NAME:latest"
echo "NAME: $NAME, IMAGE: $IMAGE, TAG: $TAG, LATEST: $LATEST"

NAME=$(basename ${GITHUB_REPOSITORY}).$(docker inspect --format '{{ index .Config.Labels "name" }}' $IMAGE)
TAG="ghrc.io/${GITHUB_REPOSITORY}/$NAME:$VERSION"
LATEST="ghcr.io/${GITHUB_REPOSITORY}/$NAME:latest"

docker tag $IMAGE $TAG
docker tag $IMAGE $LATEST
docker push $TAG
Expand Down

0 comments on commit 9a667a7

Please sign in to comment.