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.
env
1 parent c47a1cb commit c5c42c0Copy full SHA for c5c42c0
.github/workflows/trufflehog.yml
@@ -8,10 +8,11 @@ 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
- json_string=${{ toJson(github.event.commits) }}
- echo "depth=$(($(jq length <<< '$json_string') + 2))" >> $GITHUB_ENV
15
+ echo "depth=$(($(jq length <<< '$JSON_STRING') + 2))" >> $GITHUB_ENV
16
echo "branch=${{ github.ref_name }}" >> $GITHUB_ENV
17
fi
18
if [ "${{ github.event_name }}" == "pull_request" ]; then
0 commit comments