diff --git a/main.sh b/main.sh index e8ed3f8..c55cc36 100644 --- a/main.sh +++ b/main.sh @@ -61,10 +61,14 @@ if [[ -n "$SITE_NAME" ]]; then fi -if [[ -z "$SLACK_MESSAGE" ]]; then +if [[ -z "$SLACK_MESSAGE" && "null" != "$COMMIT_MESSAGE" ]]; then SLACK_MESSAGE="$COMMIT_MESSAGE" fi +if [[ -z "$SLACK_MESSAGE" ]]; then + SLACK_MESSAGE="Notification from action run \`$GITHUB_RUN_NUMBER\`, which ran against commit \`${GITHUB_SHA}\` from branch \`${GITHUB_BRANCH}\` of \`${GITHUB_REPOSITORY}\` repository." +fi + if [[ "true" == "$ENABLE_ESCAPES" ]]; then SLACK_MESSAGE="$(echo -e "$SLACK_MESSAGE")" fi