Manifest: send-slack-notification/action.yaml
This action sends a Slack message to notify about container image build failures and successes. Subsequent attempts of the same workflow run are automatically threaded in Slack. The color of the message is automatically selected based on the provided results.
Currently, two types of notifications are supported.
jobs:
notify:
name: Failure Notification
needs: [job_1, job_2, job_3]
runs-on: ubuntu-latest
if: failure() || github.run_attempt > 1
steps:
- name: Send Notification
uses: stackabletech/actions/send-slack-notification
with:
type: container-image-build
channel-id: DEADBEEF
build-result: ${{ needs.job_1.result }}
publish-helm-chart-result: ${{ needs.job_3.result }}
publish-manifests-result: ${{ needs.job_2.result }}
slack-token: ${{ secrets.MY_SECRET }}jobs:
notify:
name: Failure Notification
needs: [job_1]
runs-on: ubuntu-latest
if: failure() || github.run_attempt > 1
steps:
- name: Send Notification
uses: stackabletech/actions/send-slack-notification
with:
type: integration-test
channel-id: DEADBEEF
failed-tests: ${{ needs.job_1.failed-tests }}
test-result: ${{ needs.job_1.result }}
test-health: ${{ needs.job_1.health }}
slack-token: ${{ secrets.MY_SECRET }}Tip
For descriptions of the inputs and outputs, see the complete send-slack-notification action.
type(required, supported values:container-image-buildandintegration-test)channel-id(required)slack-token(required)build-result(optional, e.g.success)publish-manifests-result(optional, e.g.failure)publish-helm-chart-result(optional, e.g.failure)message-subject(optional, defaults togithub.workflowforcontainer-image-buildandgithub.repositoryforintegration-test)
None