Skip to content

Commit 1359946

Browse files
committed
fix(deploy): lowercase GHCR image tags via metadata-action
Docker requires lowercase repository names. github.repository returns RECTOR-LABS/core (uppercase org). Use docker/metadata-action to auto-lowercase tags.
1 parent c40c4b4 commit 1359946

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88

99
env:
1010
REGISTRY: ghcr.io
11-
IMAGE_NAME: ${{ github.repository }}
1211

1312
jobs:
1413
deploy:
@@ -32,14 +31,21 @@ jobs:
3231
username: ${{ github.actor }}
3332
password: ${{ secrets.GITHUB_TOKEN }}
3433

34+
- name: Extract metadata
35+
id: meta
36+
uses: docker/metadata-action@v5
37+
with:
38+
images: ${{ env.REGISTRY }}/${{ github.repository }}
39+
tags: |
40+
type=raw,value=latest
41+
type=sha
42+
3543
- name: Build and push Docker image
3644
uses: docker/build-push-action@v5
3745
with:
3846
context: .
3947
push: true
40-
tags: |
41-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
42-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
48+
tags: ${{ steps.meta.outputs.tags }}
4349
cache-from: type=gha
4450
cache-to: type=gha,mode=max
4551

0 commit comments

Comments
 (0)