mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Update github action to support generic cli command input (#670)
* Update github action to support generic cli command input * revert removal of inputs * echo in entrypoint * test custom docker image * revert docker image reference
This commit is contained in:
parent
dc516933f3
commit
4a3bba78cc
3 changed files with 12 additions and 5 deletions
|
@ -12,5 +12,6 @@ FROM alpine:3.15
|
|||
RUN apk add --no-cache git
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=builder /build/trufflehog /usr/bin/trufflehog
|
||||
ENTRYPOINT ["/usr/bin/trufflehog"]
|
||||
|
||||
COPY entrypoint.sh /etc/entrypoint.sh
|
||||
RUN chmod +x /etc/entrypoint.sh
|
||||
ENTRYPOINT ["/etc/entrypoint.sh"]
|
||||
|
|
|
@ -12,6 +12,10 @@ inputs:
|
|||
head:
|
||||
description: Scan commits until here (usually dev branch).
|
||||
required: false
|
||||
extra_args:
|
||||
default: ''
|
||||
description: Extra args to be passed to the trufflehog cli.
|
||||
required: false
|
||||
branding:
|
||||
icon: "shield"
|
||||
color: "green"
|
||||
|
@ -26,3 +30,4 @@ runs:
|
|||
- --branch
|
||||
- ${{ inputs.head }}
|
||||
- --fail
|
||||
- ${{ inputs.extra_args }}
|
||||
|
|
7
entrypoint.sh
Normal file → Executable file
7
entrypoint.sh
Normal file → Executable file
|
@ -1,4 +1,5 @@
|
|||
#! /usr/bin/env bash
|
||||
#!/usr/bin/env ash
|
||||
|
||||
args=("$@")
|
||||
/usr/bin/trufflehog ${args[@]}
|
||||
# `$*` expands the `args` supplied in an `array` individually
|
||||
# or splits `args` in a string separated by whitespace.
|
||||
/usr/bin/trufflehog $*
|
Loading…
Reference in a new issue