Skip to content

Commit 2cede75

Browse files
committed
add env
1 parent 0b72f1c commit 2cede75

File tree

2 files changed

+42
-34
lines changed

2 files changed

+42
-34
lines changed

.github/workflows/staging-push.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@ jobs:
5656
uses: slackapi/[email protected]
5757
env:
5858
PULL_REQUEST_JOB_STATUS: ${{ job.status }}
59+
PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }}
5960
PULL_REQUEST_JOB_STATUS_COLOR: ${{ job.status == 'success' && vars.COLOR_GREEN || job.status == 'failure' && vars.COLOR_RED || vars.COLOR_ORANGE }}
6061
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
6162
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
63+
6264
with:
6365
payload-file-path: "./payload-slack-content.json"
6466
payload-file-path-parsed: false
67+

payload-slack-content.json

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,41 @@
11
{
2-
"text": ":looker: Looker Github Action :github: - Weekly Update ${{ job.status }}",
3-
"blocks": [
4-
{
5-
"type": "header",
6-
"text": {
7-
"type": "plain_text",
8-
"text": ":looker: Looker Github Action :github: - Weekly Update ${{ job.status }}",
9-
"emoji": true
10-
}
11-
},
12-
{
13-
"type": "divider"
14-
},
15-
{
16-
"type": "section",
17-
"text": {
18-
"type": "plain_text",
19-
"text": "Status: ${{ job.status }}\n Commit: ${{ github.event.pull_request.html_url }}",
20-
"emoji": true
21-
}
22-
},
23-
{
24-
"type": "divider"
25-
},
26-
{
27-
"type": "context",
28-
"elements": [
29-
{
30-
"type": "mrkdwn",
31-
"text": ":testops-notify: created by <www.go.com|Mobile Test Engineering>"
32-
}
33-
]
34-
}
2+
"text": ":looker: Looker Github Action :github: - Weekly Update",
3+
"attachments": [
4+
{
5+
"color": "${{ env.PULL_REQUEST_JOB_STATUS_COLOR }}",
6+
"blocks": [
7+
{
8+
"type": "header",
9+
"text": {
10+
"type": "plain_text",
11+
"text": ":looker: Looker Github Action :github: - Weekly Update ${{ env.PULL_REQUEST_JOB_STATUS }}",
12+
"emoji": true
13+
}
14+
},
15+
{
16+
"type": "divider"
17+
},
18+
{
19+
"type": "section",
20+
"text": {
21+
"type": "plain_text",
22+
"text": "Status: ${{ env.PULL_REQUEST_JOB_STATUS }}\n Commit: ${{ env.PULL_REQUEST_URL }}",
23+
"emoji": true
24+
}
25+
},
26+
{
27+
"type": "divider"
28+
},
29+
{
30+
"type": "context",
31+
"elements": [
32+
{
33+
"type": "mrkdwn",
34+
"text": ":testops-notify: created by <www.go.com|Mobile Test Engineering>"
35+
}
36+
]
37+
}
38+
]
39+
}
3540
]
36-
}
41+
}

0 commit comments

Comments
 (0)