Skip to content

Commit dc4d4fa

Browse files
committed
fix(ci): Make sure docker references are lower case
1 parent afbc50e commit dc4d4fa

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/release-ghcr.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,23 @@ jobs:
4747

4848
- name: Upload to ghcr.io
4949
run: |
50+
# Downcase the package repository, because docker reference
51+
# are required to be lower case
52+
REPO_OWNER="$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')"
53+
IMAGE_REF="ghcr.io/$REPO_OWNER/cardano-db-sync"
54+
IMAGE_TAG="$GITHUB_REF_NAME"
55+
56+
# Load the image from the nix build result
5057
docker load < result
58+
59+
# Tag the image
5160
docker image tag \
5261
cardano-db-sync:latest \
53-
ghcr.io/${{ github.repository_owner }}/cardano-db-sync:$GITHUB_REF_NAME
62+
"${IMAGE_REF}:${IMAGE_TAG}"
63+
# Also tag it as latest
5464
docker image tag \
5565
cardano-db-sync:latest \
56-
ghcr.io/${{ github.repository_owner }}/cardano-db-sync:latest
57-
docker push ghcr.io/${{ github.repository_owner }}/cardano-db-sync:$GITHUB_REF_NAME
58-
docker push ghcr.io/${{ github.repository_owner }}/cardano-db-sync:latest
66+
"${IMAGE_REF}:latest"
67+
# Push the tags above
68+
docker push "${IMAGE_REF}:${IMAGE_TAG}"
69+
docker push "${IMAGE_REF}:latest"

0 commit comments

Comments
 (0)