From f00f156e2cfaa45d2243104808edf551705d604c Mon Sep 17 00:00:00 2001 From: Cristian Torres <18661121+PrototypeActual@users.noreply.github.com> Date: Thu, 23 Jan 2025 22:46:11 -0500 Subject: Update build.yml (#61) Added lowering casing of image name should it be uppercased.Switched variables to grab lowercased image name. --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 51d396d..a8d7325 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -141,6 +141,12 @@ jobs: with: string: ${{ env.IMAGE_REGISTRY }} + - name: Lowercase Image + id: image_case + uses: ASzc/change-string-case-action@v6 + with: + string: ${{ env.IMAGE_NAME }} + - 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) @@ -150,7 +156,7 @@ jobs: REGISTRY_PASSWORD: ${{ github.token }} with: registry: ${{ steps.registry_case.outputs.lowercase }} - image: ${{ env.IMAGE_NAME }} + image: ${{ steps.image_case.outputs.lowercase }} tags: ${{ steps.metadata.outputs.tags }} username: ${{ env.REGISTRY_USER }} password: ${{ env.REGISTRY_PASSWORD }} @@ -166,7 +172,7 @@ jobs: - name: Sign container image if: github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) run: | - IMAGE_FULL="${{ steps.registry_case.outputs.lowercase }}/${IMAGE_NAME}" + IMAGE_FULL="${{ steps.registry_case.outputs.lowercase }}/${{ steps.image_case.outputs.lowercase }}" for tag in ${{ steps.metadata.outputs.tags }}; do cosign sign -y --key env://COSIGN_PRIVATE_KEY $IMAGE_FULL:$tag done -- cgit v1.2.3