Skip to content

Commit

Permalink
allow for multi-line message inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
m-wayne committed Aug 1, 2024
1 parent 58e1f5f commit 1c60df0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ runs:
commit_message="Link to the latest commit in the repository"
message="<https://github.com/${{ inputs.repository }}/commit/${{ github.sha }}|$commit_message>"
fi
echo "message=$message" >> $GITHUB_OUTPUT
: # This format allows for multi-line message inputs
echo 'MESSAGE<<EOF' >> $GITHUB_ENV
$message >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
author=${{ github.event.pusher.name }} # context from `push` trigger
author=${author:-${{ github.event.sender.login }}} # context from `workflow_dispatch` trigger
Expand Down Expand Up @@ -98,8 +102,8 @@ runs:
"short": true
},
{
"title": "Commit Message",
"value": ${{ toJSON(steps.fields.outputs.message) }},
"title": "Message",
"value": ${{ toJSON(env.MESSAGE) }},
"short": false
}
]
Expand Down

0 comments on commit 1c60df0

Please sign in to comment.