Skip to content

Commit

Permalink
chore: sync files with stordco/common-config-elixir
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 16, 2024
1 parent 4820424 commit 9f8a977
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,6 @@ jobs:
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
scan-type: fs
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
slack-channel-id: ${{ secrets.SLACK_SECURITY_ALERTS }}
update-db: false

32 changes: 32 additions & 0 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This file is synced with stordco/common-config-elixir. Any changes will be overwritten.

name: Update Trivy Cache

on:
schedule:
- cron: "0 0 * * *" # Run daily at midnight UTC
workflow_dispatch: # Allow manual triggering

jobs:
update-trivy-db:
runs-on: ubuntu-latest
steps:
- 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
oras pull ghcr.io/aquasecurity/trivy-db:2
tar -xzf db.tar.gz -C $GITHUB_WORKSPACE/.cache/trivy/db
rm db.tar.gz
- name: Cache DBs
uses: actions/cache/save@v4
with:
path: $/.cache/trivy
key: cache-trivy-$

0 comments on commit 9f8a977

Please sign in to comment.