Skip to content

Commit

Permalink
fix(ci): Update reusable-image-scan.yml to use lowercase registry name (
Browse files Browse the repository at this point in the history
  • Loading branch information
apoordev authored Apr 22, 2024
1 parent dd7c210 commit 9c8f6de
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/reusable-image-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit 9c8f6de

Please sign in to comment.