mirror of
https://github.com/status-im/consul.git
synced 2025-02-16 15:47:21 +00:00
ci: fix escaping for Slack failure notifications (#19838)
Allow '()', '#', and other bash-interpretable special characters by properly quoting the commit message when shortening.
This commit is contained in:
parent
04d4412afd
commit
3a78446114
2
.github/workflows/go-tests.yml
vendored
2
.github/workflows/go-tests.yml
vendored
@ -513,7 +513,7 @@ jobs:
|
|||||||
if printf '${{ toJSON(needs) }}' | grep -E -i '\"result\": \"(failure)\"'; then
|
if printf '${{ toJSON(needs) }}' | grep -E -i '\"result\": \"(failure)\"'; then
|
||||||
printf "Tests failed, notifying Slack"
|
printf "Tests failed, notifying Slack"
|
||||||
echo "FAILED_TESTS=true" >> $GITHUB_ENV
|
echo "FAILED_TESTS=true" >> $GITHUB_ENV
|
||||||
echo "COMMIT_MESSAGE_SUMMARY=$(echo ${{ github.event.head_commit.message }} | head -n 1)" >> $GITHUB_ENV
|
echo "COMMIT_MESSAGE_SUMMARY=$(echo '${{ github.event.head_commit.message }}' | head -n 1)" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
- name: Notify Slack
|
- name: Notify Slack
|
||||||
# failure() ensures this runs even if the test eval step exits 1
|
# failure() ensures this runs even if the test eval step exits 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user