Unverified Commit fcfa270f authored by Sayak Paul's avatar Sayak Paul Committed by GitHub
Browse files

add: support for notifying the maintainers about the docker ci status. (#7113)

parent 56dac1ce
...@@ -11,6 +11,7 @@ concurrency: ...@@ -11,6 +11,7 @@ concurrency:
env: env:
REGISTRY: diffusers REGISTRY: diffusers
CI_SLACK_CHANNEL: ${{ secrets.CI_DOCKER_CHANNEL }}
jobs: jobs:
build-docker-images: build-docker-images:
...@@ -50,3 +51,27 @@ jobs: ...@@ -50,3 +51,27 @@ jobs:
context: ./docker/${{ matrix.image-name }} context: ./docker/${{ matrix.image-name }}
push: true push: true
tags: ${{ env.REGISTRY }}/${{ matrix.image-name }}:latest tags: ${{ env.REGISTRY }}/${{ matrix.image-name }}:latest
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001
with:
# Slack channel id, channel name, or user id to post message.
# See also: https://api.slack.com/methods/chat.postMessage#channels
channel-id: ${{ env.CI_SLACK_CHANNEL }}
# For posting a rich message using Block Kit
payload: |
{
"text": "${{ matrix.image-name }} Docker Image build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ matrix.image-name }} Docker Image build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment