Skip to content

Commit 26343ff

Browse files
committed
ci: fix lower casing
Signed-off-by: rizlas <rizlas@users.noreply.github.com>
1 parent 4c88a6c commit 26343ff

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ jobs:
4545
- name: Set up Docker Buildx
4646
uses: docker/setup-buildx-action@v4
4747

48+
- name: Lower case docker image name
49+
id: image
50+
uses: ASzc/change-string-case-action@v8
51+
with:
52+
string: ${{ github.repository }}
53+
4854
- name: Sanitize upstream tag
4955
if: inputs.upstream_tag != ''
5056
id: tag
@@ -69,7 +75,7 @@ jobs:
6975
context: .
7076
platforms: ${{ matrix.platform }}
7177
labels: ${{ steps.meta.outputs.labels }}
72-
outputs: type=image,name=ghcr.io/${{ github.repository }},push-by-digest=true,name-canonical=true,push=true
78+
outputs: type=image,name=ghcr.io/${{ steps.image.outputs.lowercase }},push-by-digest=true,name-canonical=true,push=true
7379
cache-from: type=gha,scope=${{ matrix.platform }}
7480
cache-to: type=gha,mode=max,scope=${{ matrix.platform }}
7581

@@ -114,6 +120,12 @@ jobs:
114120
- name: Set up Docker Buildx
115121
uses: docker/setup-buildx-action@v4
116122

123+
- name: Lower case docker image name
124+
id: image
125+
uses: ASzc/change-string-case-action@v8
126+
with:
127+
string: ${{ github.repository }}
128+
117129
- name: Sanitize upstream tag
118130
if: inputs.upstream_tag != ''
119131
id: tag
@@ -146,16 +158,16 @@ jobs:
146158
--annotation='index:org.opencontainers.image.created=${{ steps.timestamp.outputs.timestamp }}' \
147159
--annotation='index:org.opencontainers.image.url=${{ github.event.repository.url }}' \
148160
--annotation='index:org.opencontainers.image.source=${{ github.event.repository.url }}' \
149-
$(printf 'ghcr.io/${{ github.repository }}@sha256:%s ' *)
161+
$(printf 'ghcr.io/${{ steps.image.outputs.lowercase }}@sha256:%s ' *)
150162
151163
- name: Create and push manifest (without annotations)
152164
if: steps.manifest.outcome == 'failure'
153165
working-directory: /tmp/digests
154166
run: |
155167
docker buildx imagetools create \
156168
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
157-
$(printf 'ghcr.io/${{ github.repository }}@sha256:%s ' *)
169+
$(printf 'ghcr.io/${{ steps.image.outputs.lowercase }}@sha256:%s ' *)
158170
159171
- name: Inspect manifest
160172
run: |
161-
docker buildx imagetools inspect 'ghcr.io/${{ github.repository }}:${{ steps.meta.outputs.version }}'
173+
docker buildx imagetools inspect 'ghcr.io/${{ steps.image.outputs.lowercase }}:${{ steps.meta.outputs.version }}'

0 commit comments

Comments
 (0)