Skip to content

Possible to loop over commit messages in workflow action? #25164

Answered by Yanjingzhu
chrisan asked this question in Actions
Discussion options

You must be logged in to vote

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

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants