From 45680135b80d1aaec012034a5f825407a05f26b9 Mon Sep 17 00:00:00 2001 From: Tulip Blossom Date: Sat, 11 Jan 2025 17:50:43 -0300 Subject: [PATCH] fix: registry-case action is still necessary (#56) --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1fcf523..0d2f144 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -133,6 +133,14 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. + # https://github.com/macbre/push-to-ghcr/issues/12 + - name: Lowercase Registry + id: registry_case + uses: ASzc/change-string-case-action@v6 + with: + string: ${{ env.IMAGE_REGISTRY }} + - name: Push To GHCR uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2 if: github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) @@ -141,7 +149,7 @@ jobs: REGISTRY_USER: ${{ github.actor }} REGISTRY_PASSWORD: ${{ github.token }} with: - registry: ${{ env.IMAGE_REGISTRY }} + registry: ${{ steps.registry_case.outputs.lowercase }} image: ${{ env.IMAGE_NAME }} tags: ${{ steps.metadata.outputs.tags }} username: ${{ env.REGISTRY_USER }}