Skip to content

Commit c47a1cb

Browse files
committed
fix(ci): store json commit info in variable
testing with a ' in commit message body
1 parent f925d99 commit c47a1cb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/trufflehog.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ jobs:
1010
- shell: bash
1111
run: |
1212
if [ "${{ github.event_name }}" == "push" ]; then
13-
echo "depth=$(($(jq length <<< '${{ toJson(github.event.commits) }}') + 2))" >> $GITHUB_ENV
13+
json_string=${{ toJson(github.event.commits) }}
14+
echo "depth=$(($(jq length <<< '$json_string') + 2))" >> $GITHUB_ENV
1415
echo "branch=${{ github.ref_name }}" >> $GITHUB_ENV
1516
fi
1617
if [ "${{ github.event_name }}" == "pull_request" ]; then

0 commit comments

Comments
 (0)