9a14cb5ff3
CD / Release (push) Successful in 5s
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/cache](https://github.com/actions/cache) ([changelog](https://github.com/actions/cache/compare/cdf6c1fa76f9f475f3d7449005a359c84ca0f306..27d5ce7f107fe9357f9df03efb73ab90386fccae)) | action | digest | `cdf6c1f` → `27d5ce7` | --- > ⚠️ **Warning** > > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### 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. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My41LjQiLCJ1cGRhdGVkSW5WZXIiOiI0My41LjQiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImFjdGlvbiIsImRlcHMiXX0=--> --------- Co-authored-by: Timo Behrendt <t.behrendt@t00n.de> Reviewed-on: #50 Reviewed-by: t.behrendt <2+t.behrendt@noreply.localhost> Co-authored-by: Renovate Bot <renovate@t00n.de> Co-committed-by: Renovate Bot <renovate@t00n.de>
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
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: ${{runner.temp}}/trivy)"
|
|
required: false
|
|
default: "${{ runner.temp }}/trivy"
|
|
|
|
outputs:
|
|
cache-dir:
|
|
description: "Path to the Trivy cache directory"
|
|
value: ${{ inputs.cache-dir }}
|
|
|
|
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@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
with:
|
|
path: ${{ inputs.cache-dir }}
|
|
key: trivy-db-${{ steps.current-date.outputs.current-date }}
|
|
restore-keys: |
|
|
trivy-db-${{ steps.current-date.outputs.current-date }}
|
|
- if: steps.restore-db.outputs.cache-hit != 'true'
|
|
shell: bash
|
|
run: trivy fs --download-db-only --cache-dir "${{ inputs.cache-dir }}"
|