17b892e6b6
CD / Release (push) Successful in 12s
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/cache](https://github.com/actions/cache) | action | pinDigest | -> `0057852` | | [actions/checkout](https://github.com/actions/checkout) | action | pinDigest | -> `08c6903` | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTkuMyIsInVwZGF0ZWRJblZlciI6IjQxLjE1OS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhY3Rpb24iLCJkZXBzIl19--> Reviewed-on: t.behrendt/trivy-actions#9 Reviewed-by: t.behrendt <t.behrendt@noreply.localhost> Co-authored-by: Renovate Bot <renovate@t00n.de> Co-committed-by: Renovate Bot <renovate@t00n.de>
32 lines
965 B
YAML
32 lines
965 B
YAML
name: "Setup Trivy DB"
|
|
description: "Setup the trivy database, restoring from cache if available"
|
|
author: "Timo Behrendt <t.behrendt@t00n.de"
|
|
branding:
|
|
icon: "database"
|
|
color: "blue"
|
|
|
|
inputs:
|
|
cache-dir:
|
|
description: "Path to the Trivy cache directory (default: ~/.cache/trivy)"
|
|
required: false
|
|
default: "~/.cache/trivy"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- id: current-date
|
|
shell: bash
|
|
run: |
|
|
echo "current-date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
|
|
- id: restore-db
|
|
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
|
with:
|
|
path: ${{ inputs.cache-dir }}
|
|
key: trivy-db-${{ steps.current-date.outputs.current-date }}
|
|
restore-keys: |
|
|
trivy-db-${{ steps.current-date.outputs.current-date }}
|
|
trivy-db-
|
|
- if: steps.restore-db.outputs.cache-hit != 'true'
|
|
shell: bash
|
|
run: trivy fs --download-db-only --cache-dir "${{ inputs.cache-dir }}"
|