Possible to loop over commit messages in workflow action?

I’m trying to loop over the commits array 

- name: Test  
run: |  
 commits=join(${{ github.event.commits.\*.message }}, ', ')  
 echo $commits  
 commits=join(github.event.commits.\*.message, ', ')  
 echo $commits

Which results in

2020-03-27T20:44:56.4369746Z ##[group]Run commits=join(Array, ', ')
2020-03-27T20:44:56.4370544Z [36;1m[0m
2020-03-27T20:44:56.4370939Z [36;1mcommits=join(Array, ', ')[0m
2020-03-27T20:44:56.4371347Z [36;1mecho $commits[0m
2020-03-27T20:44:56.4371738Z [36;1m[0m
2020-03-27T20:44:56.4372143Z [36;1mcommits=join(github.event.commits.*.message, ', ')[0m
2020-03-27T20:44:56.4372589Z [36;1mecho $commits[0m
2020-03-27T20:44:56.4416192Z shell: /bin/bash -e {0}

Could someone point me in the right direction on how to get this array value instead of “Array”?

Hi chrisan, 

Join() function can use in expressions. You need to add ${{ }} around the expression. 

Please use the below syntax to get commits messages 

- name: Test  
run: |  
 commits=${{join(github.event.commits.\*.message, ', ') }}  
 echo $commits  

Oy vey… what a dumb mistake.  Thank you :slight_smile: