Skip to content

Commit a3e8506

Browse files
committed
Removing hardcoded options in GHA docker run and providing output configuration
outputting results outputting results outputting results outputting results outputting results outputting results outputting results
1 parent e42153d commit a3e8506

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

action.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ inputs:
2222
default: 'latest'
2323
description: Scan with this trufflehog cli version.
2424
required: false
25+
outputs:
26+
results:
27+
description: "Trufflehog scan outputs"
28+
value: ${{ steps.trufflehog.outputs.results }}
2529
branding:
2630
icon: "shield"
2731
color: "green"
@@ -30,6 +34,7 @@ runs:
3034
using: "composite"
3135
steps:
3236
- shell: bash
37+
id: trufflehog
3338
working-directory: ${{ inputs.path }}
3439
env:
3540
BASE: ${{ inputs.base }}
@@ -86,14 +91,10 @@ runs:
8691
##########################################
8792
## Run TruffleHog ##
8893
##########################################
89-
docker run --rm -v .:/tmp -w /tmp \
94+
results=$(docker run --rm -v .:/tmp -w /tmp \
9095
ghcr.io/trufflesecurity/trufflehog:${VERSION} \
9196
git file:///tmp/ \
92-
--since-commit \
93-
${BASE:-''} \
94-
--branch \
95-
${HEAD:-''} \
96-
--fail \
9797
--no-update \
9898
--github-actions \
99-
${ARGS:-''}
99+
${ARGS:-''})
100+
echo "results='$(echo $results)'" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)