Skip to content

Find, verify, and analyze leaked credentials

Use smaller array to count commits in the GHA action (#3864)

Sergei Ryabkove68e67137c7d
diff --git a/action.yml b/action.yml
index 4546d2325..bee9f2de0 100644
--- a/action.yml
+++ b/action.yml
@@ -35,7 +35,7 @@ runs:
BASE: ${{ inputs.base }}
HEAD: ${{ inputs.head }}
ARGS: ${{ inputs.extra_args }}
- COMMITS: ${{ toJson(github.event.commits) }}
+ COMMIT_IDS: ${{ toJson(github.event.commits.*.id) }}
VERSION: ${{ inputs.version }}
run: |
##########################################
@@ -64,7 +64,7 @@ runs:
##########################################
else
if [ "${{ github.event_name }}" == "push" ]; then
- COMMIT_LENGTH=$(printenv COMMITS | jq length)
+ COMMIT_LENGTH=$(printenv COMMIT_IDS | jq length)
if [ $COMMIT_LENGTH == "0" ]; then
echo "No commits to scan"
exit 0