-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (41 loc) · 1.34 KB
/
slack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: slack
on:
pull_request:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: action-slack
uses: 8398a7/action-slack@v3
with:
status: custom
fields: workflow,job,commit,repo,author,pullRequest
custom_payload: |
{
attachments: [{
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning',
fields: [
{
title: 'PR 제목',
value: `[${{ github.event.repository.name }}] ${{ github.event.pull_request.title }}`,
short: false
},
{
title: '작성자',
value: `${process.env.AS_AUTHOR}`,
short: false
}
],
title: '>>> 리뷰하러 가기 >>>',
title_link: '${{ github.event.pull_request.html_url }}',
thumb_url: '${{ github.event.pull_request.user.avatar_url }}',
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: always() # Pick up events even if the job fails or is canceled.
permissions:
contents: read
actions: read