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@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 }}"