Skip to content

Commit c5c42c0

Browse files
committed
fix(ci): move variable to env
testing '
1 parent c47a1cb commit c5c42c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/trufflehog.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- shell: bash
11+
env:
12+
JSON_STRING: ${{ toJson(github.event.commits) }}
1113
run: |
1214
if [ "${{ github.event_name }}" == "push" ]; then
13-
json_string=${{ toJson(github.event.commits) }}
14-
echo "depth=$(($(jq length <<< '$json_string') + 2))" >> $GITHUB_ENV
15+
echo "depth=$(($(jq length <<< '$JSON_STRING') + 2))" >> $GITHUB_ENV
1516
echo "branch=${{ github.ref_name }}" >> $GITHUB_ENV
1617
fi
1718
if [ "${{ github.event_name }}" == "pull_request" ]; then

0 commit comments

Comments
 (0)