Skip to content

Commit

Permalink
Update scan-vulns.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
binbin-li authored Nov 6, 2024
1 parent 2787edd commit a6a42a9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/scan-vulns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:

- name: Check out code into the Go module directory
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

- name: Download trivy
run: |
Expand All @@ -55,10 +59,17 @@ jobs:
tar zxvf trivy_${{ env.TRIVY_VERSION }}_Linux-64bit.tar.gz
echo "$(pwd)" >> $GITHUB_PATH
- name: Restore trivy cache directory
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ${{ github.workspace }}/.cache/trivy
key: cache-trivy-${{ steps.date.outputs.date }}

- name: Set up trivy cache directory
run: |
mkdir -p ~/.cache/trivy
echo ${{ github.workspace }}/.cache/trivy
echo ~/.cache/trivy
cp -r ${{ github.workspace }}/.cache/trivy ~/.cache/trivy
- name: Run trivy on git repository
Expand Down

0 comments on commit a6a42a9

Please sign in to comment.