Skip to content

Commit e1d3848

Browse files
nanotaboadaclaude
andcommitted
fix(cd): ensure lowercase image name for GHCR compatibility
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent dcfbc30 commit e1d3848

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/maven-cd.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ jobs:
7979
- name: Set up Docker Buildx
8080
uses: docker/setup-buildx-action@v4.0.0
8181

82+
- name: Set image name
83+
id: image
84+
run: echo "name=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
85+
8286
- name: Build and push Docker image to GitHub Container Registry
8387
uses: docker/build-push-action@v7.0.0
8488
with:
@@ -89,9 +93,9 @@ jobs:
8993
cache-from: type=gha
9094
cache-to: type=gha,mode=max
9195
tags: |
92-
ghcr.io/${{ github.repository }}:latest
93-
ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.semver }}
94-
ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.club }}
96+
ghcr.io/${{ steps.image.outputs.name }}:latest
97+
ghcr.io/${{ steps.image.outputs.name }}:${{ steps.tag.outputs.semver }}
98+
ghcr.io/${{ steps.image.outputs.name }}:${{ steps.tag.outputs.club }}
9599
96100
- name: Generate changelog
97101
id: changelog
@@ -121,19 +125,19 @@ jobs:
121125
122126
```bash
123127
# By semantic version (recommended)
124-
docker pull ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.semver }}
128+
docker pull ghcr.io/${{ steps.image.outputs.name }}:${{ steps.tag.outputs.semver }}
125129
126130
# By club name
127-
docker pull ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.club }}
131+
docker pull ghcr.io/${{ steps.image.outputs.name }}:${{ steps.tag.outputs.club }}
128132
129133
# Latest
130-
docker pull ghcr.io/${{ github.repository }}:latest
134+
docker pull ghcr.io/${{ steps.image.outputs.name }}:latest
131135
```
132136
133137
## Quick Start
134138
135139
```bash
136-
docker run -p 9000:9000 ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.semver }}
140+
docker run -p 9000:9000 ghcr.io/${{ steps.image.outputs.name }}:${{ steps.tag.outputs.semver }}
137141
```
138142
139143
API available at `http://localhost:9000` · Swagger UI at `http://localhost:9000/swagger/index.html`

0 commit comments

Comments
 (0)