Skip to content

Commit 5b1812b

Browse files
committed
Refactor Trivy vulnerability scanner to use extracted TRIVY_TAG for image reference
1 parent 0ae9789 commit 5b1812b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/release-image.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,14 @@ jobs:
5757
CYPHER_VERSION=${{ env.CYPHER_VERSION }}
5858
load: true
5959

60+
- name: Extract Trivy tag
61+
run: |
62+
echo "TRIVY_TAG=$(echo '${{ env.TAGS }}' | cut -d',' -f1)" >> $GITHUB_ENV
63+
6064
- name: Run Trivy vulnerability scanner
61-
uses: aquasecurity/trivy-action@22438a435773de8c97dc0958cc0b823c45b064ac
65+
uses: aquasecurity/trivy-action@0.33.1
6266
with:
63-
image-ref: ${{ env.TAGS }}
67+
image-ref: ${{ env.TRIVY_TAG }}
6468
format: 'table'
6569
exit-code: '1'
6670
ignore-unfixed: true

0 commit comments

Comments
 (0)