-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16eba0e
commit 6ee096e
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,20 +42,26 @@ jobs: | |
run: | | ||
EMAIL=$(git log -1 --pretty=format:'%ae') | ||
case "$EMAIL" in | ||
"[email protected]") SLACK_USER_ID="U07AQJWU8S3" ;; # @릴리 | ||
"[email protected]") SLACK_USER_ID="U87654321" ;; # 다른 사용자 | ||
*) SLACK_USER_ID="" ;; | ||
"[email protected]") SLACK_USER_ID="U07AQJWU8S3" ;; # @릴리 | ||
*) SLACK_USER_ID="" ;; | ||
esac | ||
echo "::set-output name=slack_user_id::$SLACK_USER_ID" | ||
echo "::set-output name=slack_mention::@${{ steps.slack-user-mapping.outputs.slack_user_id }}" | ||
- name: action-slack | ||
- name: Prepare Slack payload | ||
id: prepare-slack-payload | ||
run: | | ||
MENTION="<@${{ steps.slack-user-mapping.outputs.slack_user_id }}" | ||
echo "::set-output name=slack_mention::${MENTION}" | ||
- name: Send Slack notification | ||
uses: 8398a7/action-slack@v3 | ||
with: | ||
status: ${{ job.status }} | ||
author_name: Github Action Test | ||
fields: repo,pullRequest,eventName,author,message,commit,action,took | ||
mention: '@릴리(최윤서)' #<@${{ steps.slack-user-mapping.outputs.slack_user_id }}> | ||
mention: ${{ steps.prepare-slack-payload.outputs.slack_mention }} | ||
if_mention: failure,cancelled | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
if: always() | ||
if: failure() |