File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -101,3 +101,44 @@ jobs:
101101 image-registry-password : ${{ secrets.HARBOR_ROBOT_SDP_GITHUB_ACTION_BUILD_SECRET }}
102102 image-repository : ${{ format('sdp/{0}', env.IMAGE_REPOSITORY) }}
103103 image-index-manifest-tag : ${{ inputs.image-index-manifest-tag }}
104+
105+ notify :
106+ name : Failure Notification
107+ needs : [mirror-image, publish_manifests]
108+ runs-on : ubuntu-latest
109+ if : failure()
110+ steps :
111+ - uses : slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
112+ with :
113+ channel-id : " C07UG6JH44F" # notifications-container-images
114+ payload : |
115+ {
116+ "text": "*${{ github.workflow }}* failed",
117+ "attachments": [
118+ {
119+ "pretext": "See the details below for a summary of which job(s) failed.",
120+ "color": "#aa0000",
121+ "fields": [
122+ {
123+ "title": "Mirror Image",
124+ "short": true,
125+ "value": "${{ needs.mirror-image.result }}"
126+ },
127+ {
128+ "title": "Build/Publish Manifests",
129+ "short": true,
130+ "value": "${{ needs.publish_manifests.result }}"
131+ }
132+ ],
133+ "actions": [
134+ {
135+ "type": "button",
136+ "text": "Go to workflow run",
137+ "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
138+ }
139+ ]
140+ }
141+ ]
142+ }
143+ env :
144+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_CONTAINER_IMAGE_TOKEN }}
You can’t perform that action at this time.
0 commit comments