Skip to content

Commit

Permalink
fix: 슬랙 전송 시 멘션 기능
Browse files Browse the repository at this point in the history
  • Loading branch information
lilychoibb committed Jul 18, 2024
1 parent 5003c84 commit f33b691
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,9 @@ jobs:
with:
status: ${{ job.status }}
author_name: Github Action Test
custom_payload: |
{
"text": ":출입금지: Failed GitHub Actions",
"attachments": [
{
"author_name": "Github Action Test",
"fields": [
{"title": "repo", "value": "${{ github.repository }}", "short": true},
{"title": "message", "value": "${{ github.event.head_commit.message }}", "short": true},
{"title": "commit", "value": "${{ github.sha }}", "short": true},
{"title": "author", "value": "<@${{ steps.slack-user-mapping.outputs.slack_user_id }}>", "short": true},
{"title": "action", "value": "${{ github.event.action }}", "short": true},
{"title": "took", "value": "${{ github.run_duration_seconds }} sec", "short": true},
{"title": "eventName", "value": "${{ github.event_name }}", "short": true},
{"title": "pullRequest", "value": "${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}", "short": true}
]
}
]
}
fields: repo,pullRequest,eventName,author,message,commit,action,took
mention: '<@${{ steps.slack-user-mapping.outputs.slack_user_id }}>'
if_mention: failure,cancelled
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
if: always()

0 comments on commit f33b691

Please sign in to comment.