mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
fix: Github CI example fails with single quote
This commit is contained in:
parent
48c1d528aa
commit
4ac208f870
1 changed files with 4 additions and 1 deletions
|
@ -471,9 +471,12 @@ If you're incorporating TruffleHog into a standalone workflow and aren't running
|
|||
```
|
||||
...
|
||||
- shell: bash
|
||||
env:
|
||||
JSON_STRING: ${{ toJson(github.event.commits) }}
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "push" ]; then
|
||||
echo "depth=$(($(jq length <<< '${{ toJson(github.event.commits) }}') + 2))" >> $GITHUB_ENV
|
||||
printf '%s\n' "$JSON_STRING" > commit_info.json
|
||||
echo "depth=$(($(jq length < commit_info.json) + 2))" >> $GITHUB_ENV
|
||||
echo "branch=${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [ "${{ github.event_name }}" == "pull_request" ]; then
|
||||
|
|
Loading…
Reference in a new issue