Skip to content

Commit b38b472

Browse files
committed
Use lowecase release name
1 parent 19e0846 commit b38b472

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ jobs:
262262
steps:
263263
- uses: actions/checkout@v4
264264

265+
- name: Lowercase image name
266+
id: image
267+
run: echo "name=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
268+
265269
- uses: docker/setup-buildx-action@v3
266270

267271
- uses: docker/login-action@v3
@@ -274,15 +278,15 @@ jobs:
274278
id: meta
275279
uses: docker/metadata-action@v5
276280
with:
277-
images: ghcr.io/${{ github.repository }}
281+
images: ${{ steps.image.outputs.name }}
278282

279283
- name: Build and push
280284
uses: docker/build-push-action@v6
281285
with:
282286
context: .
283287
platforms: ${{ matrix.platform }}
284288
push: true
285-
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}-${{ matrix.suffix }}
289+
tags: ${{ steps.image.outputs.name }}:${{ github.ref_name }}-${{ matrix.suffix }}
286290
labels: ${{ steps.meta.outputs.labels }}
287291
cache-from: type=gha,scope=${{ matrix.suffix }}
288292
cache-to: type=gha,mode=max,scope=${{ matrix.suffix }}
@@ -294,6 +298,10 @@ jobs:
294298
if: github.ref_type == 'tag' && !(github.event_name == 'workflow_dispatch' && inputs.dry_run)
295299
runs-on: ubuntu-latest
296300
steps:
301+
- name: Lowercase image name
302+
id: image
303+
run: echo "name=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
304+
297305
- uses: docker/setup-buildx-action@v3
298306

299307
- uses: docker/login-action@v3
@@ -306,7 +314,7 @@ jobs:
306314
id: meta
307315
uses: docker/metadata-action@v5
308316
with:
309-
images: ghcr.io/${{ github.repository }}
317+
images: ${{ steps.image.outputs.name }}
310318
tags: |
311319
type=semver,pattern={{version}}
312320
type=semver,pattern={{major}}.{{minor}}
@@ -317,7 +325,7 @@ jobs:
317325
env:
318326
TAGS: ${{ steps.meta.outputs.tags }}
319327
run: |
320-
IMAGE="ghcr.io/${{ github.repository }}"
328+
IMAGE="${{ steps.image.outputs.name }}"
321329
TAG="${GITHUB_REF_NAME}"
322330
323331
while IFS= read -r tag; do

0 commit comments

Comments
 (0)