File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 40
40
with :
41
41
token : ${{ secrets.SCRIBD_SLACK_GENERIC_TOKEN_PUBLIC }}
42
42
channel : test-release-notification
43
- message : <https://scribd.com|Special characters + " quotes" + `backtick`>
43
+ message : <https://scribd.com|Special characters + 'single quote' + "double quotes" + `backtick`>
44
44
test-overwrite-repository :
45
45
runs-on : ubuntu-22.04
46
46
steps :
Original file line number Diff line number Diff line change 28
28
using : composite
29
29
steps :
30
30
- name : Set fields
31
+ env :
32
+ input_message : ${{ inputs.message }}
33
+ commit_message : ${{ github.event.head_commit.message }}
31
34
shell : bash
32
35
if : always()
33
36
id : fields
@@ -43,11 +46,11 @@ runs:
43
46
echo "color=warning" >> $GITHUB_OUTPUT
44
47
fi
45
48
46
- if [ ! -z '${{ inputs.message }}' ]; then
47
- message='${{ inputs.message }}'
48
- elif [ ! -z '${{ github.event.head_commit.message }}' ]; then
49
+ if [ ! -z "$input_message" ]; then
50
+ message=$input_message
51
+ elif [ ! -z "$commit_message" ]; then
49
52
# get commit message from `push` trigger
50
- commit_message=$(echo '${{ github.event.head_commit.message }}' | head -n 1)
53
+ commit_message=$(echo "$commit_message" | head -n 1)
51
54
message="<https://github.com/${{ inputs.repository }}/commit/${{ github.sha }}|$commit_message>"
52
55
elif git rev-parse --is-inside-git-dir > /dev/null 2>&1; then
53
56
# get commit message from the current git directory to support `workflow_dispatch` trigger
You can’t perform that action at this time.
0 commit comments