From 9c8f6de89f040618b7185ad975263922a499c13d Mon Sep 17 00:00:00 2001 From: Barrett Date: Mon, 22 Apr 2024 14:09:04 -0400 Subject: [PATCH] fix(ci): Update reusable-image-scan.yml to use lowercase registry name (#1183) --- .github/workflows/reusable-image-scan.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-image-scan.yml b/.github/workflows/reusable-image-scan.yml index 448a4518ce5..79b4ecdab87 100644 --- a/.github/workflows/reusable-image-scan.yml +++ b/.github/workflows/reusable-image-scan.yml @@ -41,9 +41,15 @@ jobs: curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin syft version + - name: Lowercase Registry + id: registry_case + uses: ASzc/change-string-case-action@v6 + with: + string: ${{ matrix.image }} + - name: Generate SBOM env: - IMAGE: ${{ matrix.image }} + IMAGE: ${{ steps.registry_case.outputs.lowercase }} run: | syft ${IMAGE} \ --output cyclonedx-json=sbom.json \ @@ -60,7 +66,7 @@ jobs: - name: Generate artifact name id: artifact-name env: - IMAGE: ${{ matrix.image }} + IMAGE: ${{ steps.registry_case.outputs.lowercase }} run: | echo "name=$(echo ${IMAGE} | awk -F'/' '{print $NF}' | sed 's/:/-/g')" >> $GITHUB_OUTPUT