fix: CI/CD workflow - fix Docker repository name case sensitivity issue
Some checks failed
CI/CD / test (push) Successful in 19s
CI/CD / build (push) Successful in 19s
CI/CD / docker (push) Failing after 17s

The Docker registry requires repository names to be lowercase.
Fixed by converting the Gitea repository owner to lowercase for image tags
while keeping the original case for authentication purposes.
This commit is contained in:
2026-08-05 23:49:40 +03:00
parent c434a842fb
commit f01b5b2b36

View File

@@ -11,6 +11,8 @@ env:
GO_VERSION: "1.25"
REGISTRY: gitea.mrixs.me
IMAGE_NAME: naviwatcher
# Convert repository owner to lowercase for Docker compatibility
REPO_OWNER_LOWER: ${{ toLower(gitea.repository_owner) }}
jobs:
test:
@@ -90,7 +92,7 @@ jobs:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ gitea.repository_owner }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ gitea.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ gitea.repository_owner }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ gitea.repository_owner }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
${{ env.REGISTRY }}/${{ env.REPO_OWNER_LOWER }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.REPO_OWNER_LOWER }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER_LOWER }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_OWNER_LOWER }}/${{ env.IMAGE_NAME }}:buildcache,mode=max