From 36f2f0c2f97391981ed7e07cdc6d116577e3b0c6 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Fri, 7 Nov 2025 21:24:12 +1030 Subject: [PATCH] BuildX doesn't like camelcase tags --- .gitea/workflows/build-and-push.yaml | 12 ++++++++---- .gitea/workflows/ci.yaml | 14 ++++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml index a495ad3..30e8b2e 100644 --- a/.gitea/workflows/build-and-push.yaml +++ b/.gitea/workflows/build-and-push.yaml @@ -14,7 +14,11 @@ jobs: runs-on: ubuntu-latest environment: production steps: - + - name: Convert to lowercase + id: github_repository_to_lowercase + uses: step-security/change-string-case-action@v6 + with: + inputStr: ${{ github.repository }} # Replace with your variable # ------------------------------------------------------------------ # 1. Checkout repository # ------------------------------------------------------------------ @@ -51,9 +55,9 @@ jobs: # do not push yet push: false tags: | - ${{ secrets.REGISTRY_HOST }}/${{ github.repository }}:${{ github.sha }} - ${{ secrets.REGISTRY_HOST }}/${{ github.repository }}:${{ github.ref_name }} - ${{ secrets.REGISTRY_HOST }}/${{ github.repository }}:latest + ${{ secrets.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.sha }} + ${{ secrets.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.ref_name }} + ${{ secrets.REGISTRY_HOST }}/${{ github.repositorysteps.github_repository_to_lowercase.outputs.lowercase }}:latest build-args: | # Add any build args here # ARG_NAME=VALUE diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 08e88b8..a5d4e7a 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -11,7 +11,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - + + - name: Convert to lowercase + id: github_repository_to_lowercase + uses: step-security/change-string-case-action@v6 + with: + inputStr: ${{ github.repository }} # Replace with your variable + - name: Build image id: build uses: docker/build-push-action@v5 @@ -21,9 +27,9 @@ jobs: # do not push yet push: false tags: | - ${{ secrets.REGISTRY_HOST }}/${{ github.repository }}:${{ github.sha }} - ${{ secrets.REGISTRY_HOST }}/${{ github.repository }}:${{ github.ref_name }} - ${{ secrets.REGISTRY_HOST }}/${{ github.repository }}:latest + ${{ secrets.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.sha }} + ${{ secrets.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:${{ github.ref_name }} + ${{ secrets.REGISTRY_HOST }}/${{ steps.github_repository_to_lowercase.outputs.lowercase }}:latest build-args: | # Add any build args here # ARG_NAME=VALUE \ No newline at end of file