We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f925d99 commit 40c4ff6Copy full SHA for 40c4ff6
.github/workflows/trufflehog.yml
@@ -8,9 +8,12 @@ jobs:
8
runs-on: ubuntu-latest
9
steps:
10
- shell: bash
11
+ env:
12
+ JSON_STRING: ${{ toJson(github.event.commits) }}
13
run: |
14
if [ "${{ github.event_name }}" == "push" ]; then
- echo "depth=$(($(jq length <<< '${{ toJson(github.event.commits) }}') + 2))" >> $GITHUB_ENV
15
+ printf '%s\n' "$JSON_STRING" > commit_info.json
16
+ echo "depth=$(($(jq length < commit_info.json) + 2))" >> $GITHUB_ENV
17
echo "branch=${{ github.ref_name }}" >> $GITHUB_ENV
18
fi
19
if [ "${{ github.event_name }}" == "pull_request" ]; then
0 commit comments