Skip to content

Commit e68e671

Browse files
authored
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
1 parent 3ee9c2f commit e68e671

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ runs:
3535
BASE: ${{ inputs.base }}
3636
HEAD: ${{ inputs.head }}
3737
ARGS: ${{ inputs.extra_args }}
38-
COMMITS: ${{ toJson(github.event.commits) }}
38+
COMMIT_IDS: ${{ toJson(github.event.commits.*.id) }}
3939
VERSION: ${{ inputs.version }}
4040
run: |
4141
##########################################
@@ -64,7 +64,7 @@ runs:
6464
##########################################
6565
else
6666
if [ "${{ github.event_name }}" == "push" ]; then
67-
COMMIT_LENGTH=$(printenv COMMITS | jq length)
67+
COMMIT_LENGTH=$(printenv COMMIT_IDS | jq length)
6868
if [ $COMMIT_LENGTH == "0" ]; then
6969
echo "No commits to scan"
7070
exit 0

0 commit comments

Comments
 (0)