Skip to content

Commit

Permalink
BC-8372 - fix cache nameing
Browse files Browse the repository at this point in the history
  • Loading branch information
mamutmk5 authored Nov 7, 2024
1 parent 787bd55 commit e5a41e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,14 @@ jobs:
contents: read
security-events: write
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Restore cached trivy DBs
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/.cache/trivy
key: cache-trivy
key: cache-trivy-${{ steps.date.outputs.date }}
- name: run trivy vulnerability scanner
uses: aquasecurity/trivy-action@1f6384b6ceecbbc6673526f865b818a2a06b07c9
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
- name: Setup oras
uses: oras-project/setup-oras@v1

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

- name: Download and extract the vulnerability DB
run: |
mkdir -p $GITHUB_WORKSPACE/.cache/trivy/db
Expand All @@ -32,4 +36,4 @@ jobs:
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/.cache/trivy
key: cache-trivy
key: cache-trivy-${{ steps.date.outputs.date }}

0 comments on commit e5a41e5

Please sign in to comment.