name: "Setup Trivy DB" description: "Setup the trivy database, restoring from cache if available" author: "Timo Behrendt > $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 }}"