Skip to content

Commit 98d7765

Browse files
committed
chore(workflows): normalize image name to lowercase in Docker publish workflow
- Added a step to convert the image name to lowercase and store it in the environment variable `IMAGE_NAME_LOWER`. - Updated references in the Docker metadata and build steps to use the normalized image name, ensuring consistency across multi-platform builds.
1 parent 1da11ec commit 98d7765

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/docker-publish.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
- name: Checkout repository
4343
uses: actions/checkout@v4
4444

45+
- name: Normalize image name to lowercase
46+
run: echo "IMAGE_NAME_LOWER=${IMAGE_NAME,,}" >> $GITHUB_ENV
47+
4548
# Set up BuildKit Docker container builder to be able to build
4649
# multi-platform images and export cache
4750
# https://github.com/docker/setup-buildx-action
@@ -67,7 +70,7 @@ jobs:
6770
id: meta
6871
uses: docker/metadata-action@v5
6972
with:
70-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
73+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}
7174

7275
# Build and push per-arch image by digest (don't push on PR)
7376
# https://github.com/docker/build-push-action
@@ -82,7 +85,7 @@ jobs:
8285
labels: ${{ steps.meta.outputs.labels }}
8386
cache-from: type=gha
8487
cache-to: type=gha,mode=max
85-
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true
88+
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }},push-by-digest=true
8689

8790
- name: Export digest
8891
if: ${{ github.event_name != 'pull_request' }}
@@ -129,7 +132,7 @@ jobs:
129132
id: meta
130133
uses: docker/metadata-action@v5
131134
with:
132-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
135+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}
133136

134137
- name: Create and push multi-arch manifest
135138
run: |

0 commit comments

Comments
 (0)