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

* use array of commit_ids in GHA action

* rename env var COMMIT to COMMIT_IDS
This commit is contained in:
Sergei Ryabkov
2025-02-05 15:28:02 -06:00
committed by GitHub
parent 3ee9c2f1af
commit e68e67137c
+2 -2
View File
@@ -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