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