File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 28
28
token : ${{ secrets.SCRIBD_SLACK_GENERIC_TOKEN_PUBLIC }}
29
29
channel : test-release-notification
30
30
message : <https://scribd.com|Custom message>
31
+ test-custom-message-with-special-characters :
32
+ runs-on : ubuntu-22.04
33
+ steps :
34
+ - name : Checkout
35
+ uses : actions/checkout@v3
36
+ with :
37
+ token : ${{ secrets.GITHUB_TOKEN }}
38
+ - name : Run action
39
+ uses : ./
40
+ with :
41
+ token : ${{ secrets.SCRIBD_SLACK_GENERIC_TOKEN_PUBLIC }}
42
+ channel : test-release-notification
43
+ message : <https://scribd.com|Special characters + "quotes" + `backtick`>
31
44
test-overwrite-repository :
32
45
runs-on : ubuntu-22.04
33
46
steps :
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ runs:
35
35
echo "color=warning" >> $GITHUB_OUTPUT
36
36
fi
37
37
38
- if [ ! -z " ${{ inputs.message }}" ]; then
39
- message=" ${{ inputs.message }}"
40
- elif [ ! -z " ${{ github.event.head_commit.message }}" ]; then
38
+ if [ ! -z ' ${{ inputs.message }}' ]; then
39
+ message=' ${{ inputs.message }}'
40
+ elif [ ! -z ' ${{ github.event.head_commit.message }}' ]; then
41
41
# get commit message from `push` trigger
42
- commit_message=$(echo " ${{ github.event.head_commit.message }}" | head -n 1)
42
+ commit_message=$(echo ' ${{ github.event.head_commit.message }}' | head -n 1)
43
43
message="<https://github.com/${{ inputs.repository }}/commit/${{ github.sha }}|$commit_message>"
44
44
elif git rev-parse --is-inside-git-dir > /dev/null 2>&1; then
45
45
# get commit message from the current git directory to support `workflow_dispatch` trigger
91
91
},
92
92
{
93
93
"title": "Commit Message",
94
- "value": " ${{ steps.fields.outputs.message }}" ,
94
+ "value": ${{ toJSON( steps.fields.outputs.message) }},
95
95
"short": false
96
96
}
97
97
]
You can’t perform that action at this time.
0 commit comments