11# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22#
3- # Generated on 2024 -08-20T09:47:46Z by kres 7be2a05 .
3+ # Generated on 2025 -08-20T08:13:43Z by kres ff3b493-dirty .
44
5- name : slack-notify
65" on " :
76 workflow_run :
87 workflows :
98 - default
109 types :
1110 - completed
11+ name : slack-notify
1212jobs :
1313 slack-notify :
1414 runs-on :
@@ -24,69 +24,71 @@ jobs:
2424 run : |
2525 echo pull_request_number=$(gh pr view -R ${{ github.repository }} ${{ github.event.workflow_run.head_repository.owner.login }}:${{ github.event.workflow_run.head_branch }} --json number --jq .number) >> $GITHUB_OUTPUT
2626 - name : Slack Notify
27- uses : slackapi/slack-github-action@v1
27+ uses : slackapi/slack-github-action@v2
2828 with :
29- channel-id : proj-talos-maintainers
29+ method : chat.postMessage
3030 payload : |
3131 {
32+ "channel": "ci-all",
33+ "text": "${{ github.event.workflow_run.conclusion }} - ${{ github.repository }}",
34+ "icon_emoji": "${{ github.event.workflow_run.conclusion == 'success' && ':white_check_mark:' || github.event.workflow_run.conclusion == 'failure' && ':x:' || ':warning:' }}",
35+ "username": "GitHub Actions",
3236 "attachments": [
3337 {
34- "color": "${{ github.event.workflow_run.conclusion == 'success' && '#2EB886' || github.event.workflow_run.conclusion == 'failure' && '#A30002' || '#FFCC00' }}",
35- "fallback": "test",
3638 "blocks": [
3739 {
38- "type": "section",
3940 "fields": [
4041 {
41- "type ": "mrkdwn ",
42- "text ": "${{ github.event.workflow_run.event == 'pull_request' && format('*Pull Request:* {0} (`{1}`)\n<{2}/pull/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, steps.get-pr-number.outputs.pull_request_number, github.event.workflow_run.display_title) || format('*Build:* {0} (`{1}`)\n<{2}/commit/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, github.sha, github.event.workflow_run.display_title) }} "
42+ "text ": "${{ github.event.workflow_run.event == 'pull_request' && format('*Pull Request:* {0} (`{1}`)\n<{2}/pull/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, steps.get-pr-number.outputs.pull_request_number, github.event.workflow_run.display_title) || format('*Build:* {0} (`{1}`)\n<{2}/commit/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, github.sha, github.event.workflow_run.display_title) }} ",
43+ "type ": "mrkdwn "
4344 },
4445 {
45- "type ": "mrkdwn ",
46- "text ": "*Status:*\n`${{ github.event.workflow_run.conclusion }}` "
46+ "text ": "*Status:*\n`${{ github.event.workflow_run.conclusion }}` ",
47+ "type ": "mrkdwn "
4748 }
48- ]
49+ ],
50+ "type": "section"
4951 },
5052 {
51- "type": "section",
5253 "fields": [
5354 {
54- "type ": "mrkdwn ",
55- "text ": "*Author:*\n`${{ github.actor }}` "
55+ "text ": "*Author:*\n`${{ github.actor }}` ",
56+ "type ": "mrkdwn "
5657 },
5758 {
58- "type ": "mrkdwn ",
59- "text ": "*Event:*\n`${{ github.event.workflow_run.event }}` "
59+ "text ": "*Event:*\n`${{ github.event.workflow_run.event }}` ",
60+ "type ": "mrkdwn "
6061 }
61- ]
62+ ],
63+ "type": "section"
6264 },
6365 {
6466 "type": "divider"
6567 },
6668 {
67- "type": "actions",
6869 "elements": [
6970 {
70- "type": "button",
7171 "text": {
72- "type ": "plain_text ",
73- "text ": "Logs "
72+ "text ": "Logs ",
73+ "type ": "plain_text "
7474 },
75+ "type": "button",
7576 "url": "${{ github.event.workflow_run.html_url }}"
7677 },
7778 {
78- "type": "button",
7979 "text": {
80- "type ": "plain_text ",
81- "text ": "Commit "
80+ "text ": "Commit ",
81+ "type ": "plain_text "
8282 },
83+ "type": "button",
8384 "url": "${{ github.event.repository.html_url }}/commit/${{ github.sha }}"
8485 }
85- ]
86+ ],
87+ "type": "actions"
8688 }
87- ]
89+ ],
90+ "color": "${{ github.event.workflow_run.conclusion == 'success' && '#2EB886' || github.event.workflow_run.conclusion == 'failure' && '#A30002' || '#FFCC00' }}"
8891 }
8992 ]
9093 }
91- env :
92- SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
94+ token : ${{ secrets.SLACK_BOT_TOKEN_V2 }}
0 commit comments