feat: Allow skipping setup (#414)

If a user is invoking the action multiple times then the trivy binary
gets installed multiple times.  Users can avoid this by managing the
installation themselves and setting the skip-setup input to true, or by
letting the action install in on their first invocation and then setting
skip-setup to true on subsequent invocations

Co-authored-by: simar7 <1254783+simar7@users.noreply.github.com>
This commit is contained in:
Rob Vesse
2024-10-16 02:57:47 +01:00
committed by GitHub
parent 915b19bbe7
commit fc1500abdc
2 changed files with 98 additions and 0 deletions
+5
View File
@@ -103,11 +103,16 @@ inputs:
description: 'Used to specify whether caching is needed. Set to false, if you would like to disable caching.'
required: false
default: 'true'
skip-setup-trivy:
description: 'skip calling the setup-trivy action to install trivy'
required: false
default: 'false'
runs:
using: 'composite'
steps:
- name: Install Trivy
if: ${{ inputs.skip-setup-trivy == 'false' }}
uses: aquasecurity/setup-trivy@v0.2.1
with:
version: ${{ inputs.version }}