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:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user