Skip to content

Commit d14557d

Browse files
author
John Rogers
committed
Convert repository owner to lowercase for Docker tags in CI workflow
1 parent f913264 commit d14557d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/docker-build.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
- name: Set up Docker Buildx
2525
uses: docker/setup-buildx-action@v3
2626

27+
# Convert repository owner to lowercase for Docker tags
28+
- name: Set lower case owner name
29+
run: echo "OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
30+
2731
- name: Log in to GitHub Container Registry
2832
uses: docker/login-action@v3
2933
with:
@@ -39,8 +43,8 @@ jobs:
3943
platforms: linux/amd64,linux/arm64
4044
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
4145
tags: |
42-
ghcr.io/${{ github.repository_owner }}/laterbase-app:${{ github.sha }}
43-
ghcr.io/${{ github.repository_owner }}/laterbase-app:latest
46+
ghcr.io/${{ env.OWNER_LC }}/laterbase-app:${{ github.sha }}
47+
ghcr.io/${{ env.OWNER_LC }}/laterbase-app:latest
4448
4549
- name: Build and push backup image
4650
uses: docker/build-push-action@v5
@@ -50,8 +54,8 @@ jobs:
5054
platforms: linux/amd64,linux/arm64
5155
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
5256
tags: |
53-
ghcr.io/${{ github.repository_owner }}/laterbase-backup:${{ github.sha }}
54-
ghcr.io/${{ github.repository_owner }}/laterbase-backup:latest
57+
ghcr.io/${{ env.OWNER_LC }}/laterbase-backup:${{ github.sha }}
58+
ghcr.io/${{ env.OWNER_LC }}/laterbase-backup:latest
5559
5660
- name: Build and push restore_ui image
5761
uses: docker/build-push-action@v5
@@ -61,5 +65,5 @@ jobs:
6165
platforms: linux/amd64,linux/arm64
6266
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
6367
tags: |
64-
ghcr.io/${{ github.repository_owner }}/laterbase-restore-ui:${{ github.sha }}
65-
ghcr.io/${{ github.repository_owner }}/laterbase-restore-ui:latest
68+
ghcr.io/${{ env.OWNER_LC }}/laterbase-restore-ui:${{ github.sha }}
69+
ghcr.io/${{ env.OWNER_LC }}/laterbase-restore-ui:latest

0 commit comments

Comments
 (0)