chore(actions): check to install jq if it is not already (#4000)
- Change single quotes to double quotes for consistency - Add a check to install `jq` if it is not already installed Signed-off-by: Bo-Yi Wu <[email protected]> Co-authored-by: Kashif Khan <[email protected]> Co-authored-by: Nabeel Alam <[email protected]>
This commit is contained in:
co-authored by
Kashif Khan
Nabeel Alam
parent
45655e9963
commit
f3b7c132cf
+10
-3
@@ -10,16 +10,16 @@ inputs:
|
||||
base:
|
||||
description: Start scanning from here (usually main branch).
|
||||
required: false
|
||||
default: ''
|
||||
default: ""
|
||||
head:
|
||||
description: Scan commits until here (usually dev branch).
|
||||
required: false
|
||||
extra_args:
|
||||
default: ''
|
||||
default: ""
|
||||
description: Extra args to be passed to the trufflehog cli.
|
||||
required: false
|
||||
version:
|
||||
default: 'latest'
|
||||
default: "latest"
|
||||
description: Scan with this trufflehog cli version.
|
||||
required: false
|
||||
branding:
|
||||
@@ -43,6 +43,13 @@ runs:
|
||||
## Scan by BASE & HEAD user inputs ##
|
||||
## If BASE == HEAD, exit with error ##
|
||||
##########################################
|
||||
# Check if jq is installed, if not, install it
|
||||
if ! command -v jq &> /dev/null
|
||||
then
|
||||
echo "jq could not be found, installing..."
|
||||
apt-get -y update && apt-get install -y jq
|
||||
fi
|
||||
|
||||
git status >/dev/null # make sure we are in a git repository
|
||||
if [ -n "$BASE" ] || [ -n "$HEAD" ]; then
|
||||
if [ -n "$BASE" ]; then
|
||||
|
||||
Reference in New Issue
Block a user