fix: Github CI example fails with single quote

This commit is contained in:
Luc Georges 2024-06-17 11:44:01 +02:00
parent 48c1d528aa
commit 4ac208f870
No known key found for this signature in database
GPG key ID: 8A2B84C1466CDF50

View file

@ -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