File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 19
19
uses : ./.github/workflows/reusable_build_image.yaml
20
20
secrets :
21
21
harbor-robot-secret : ${{ secrets.HARBOR_ROBOT_DEMOS_GITHUB_ACTION_BUILD_SECRET }}
22
+ slack-token : ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
22
23
with :
23
24
image-name : jupyter-pyspark-with-alibi-detect
24
25
# TODO (@NickLarsenNZ): Use a versioned image with stackable0.0.0-dev or stackableXX.X.X so that
Original file line number Diff line number Diff line change 18
18
uses : ./.github/workflows/reusable_build_image.yaml
19
19
secrets :
20
20
harbor-robot-secret : ${{ secrets.HARBOR_ROBOT_DEMOS_GITHUB_ACTION_BUILD_SECRET }}
21
+ slack-token : ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
21
22
with :
22
23
image-name : nifi
23
24
# TODO (@NickLarsenNZ): Use a versioned image with stackable0.0.0-dev or stackableXX.X.X so that
Original file line number Diff line number Diff line change 14
14
harbor-robot-secret :
15
15
description : The secret for the Harbor robot user used to push images and manifest
16
16
required : true
17
+ slack-token :
18
+ description : The Slack token used to post failure notifications
19
+ required : true
17
20
18
21
jobs :
19
22
build :
79
82
image-registry-password : ${{ secrets.harbor-robot-secret }}
80
83
image-repository : demos/${{ env.IMAGE_NAME }}
81
84
image-index-manifest-tag : ${{ env.IMAGE_VERSION }}
85
+
86
+ notify :
87
+ name : Failure Notification
88
+ needs : [build, publish_manifests]
89
+ runs-on : ubuntu-latest
90
+ if : failure()
91
+ steps :
92
+ - uses : slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
93
+ with :
94
+ channel-id : " C07UG6JH44F" # notifications-container-images
95
+ payload : |
96
+ {
97
+ "text": "*${{ github.workflow }}* failed (attempt ${{ github.run_attempt }})",
98
+ "attachments": [
99
+ {
100
+ "pretext": "See the details below for a summary of which job(s) failed.",
101
+ "color": "#aa0000",
102
+ "fields": [
103
+ {
104
+ "title": "Build/Publish Image",
105
+ "short": true,
106
+ "value": "${{ needs.build.result }}"
107
+ },
108
+ {
109
+ "title": "Build/Publish Manifests",
110
+ "short": true,
111
+ "value": "${{ needs.publish_manifests.result }}"
112
+ }
113
+ ],
114
+ "actions": [
115
+ {
116
+ "type": "button",
117
+ "text": "Go to workflow run",
118
+ "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}"
119
+ }
120
+ ]
121
+ }
122
+ ]
123
+ }
124
+ env :
125
+ SLACK_BOT_TOKEN : ${{ secrets.slack-token }}
You can’t perform that action at this time.
0 commit comments