It sends Slack notifications for failed GitHub Checks reported by the Cirrus CI, SonarCloud, SonarQube, and AzureDevops apps.
Notifications will be triggered upon build failures in any of the following platforms
- SonarCloud
- SonarQube-Next
- CirrusCI
- Azure Pipelines
Slack notifications will be enabled only for builds in the following branches
- master
- main
- dogfood-*
- branch-*
The repository needs to be onboarded to Vault.
development/kv/data/slack
Create a new GitHub workflow:
# .github/workflows/slack_notify.yml
---
name: Slack Notifications
on:
check_run:
types: [rerequested, completed]
jobs:
slack-notifications:
permissions:
id-token: write # to authenticate via OIDC
uses: SonarSource/gh-action_build-notify/.github/workflows/main.yaml@v2
with:
slackChannel: <your_slack_channel>
WARNING This workflow has to be merged into the default branch before being able to be used. There is a limitation (or a security feature) from GitHub. Workflows which are triggered based on check_run have to be merged to the default branch.
Option name | Description | Default |
---|---|---|
slackChannel |
Name of the slack channel where the notifications are to be sent. | build |
environment |
Name of the GitHub Environment to use. Required if your repository uses GitHub Environments with a modified OIDC sub claim. Set to slack in this case. |
Do not use environments |
This project is using Semantic Versioning.
Branches prefixed with a v
are pointers to the last major versions, ie: v1
.
Note: the
master
branch is used for development and can not be referenced directly. Use av
branch or a tag instead.
To create a new release,
- Draft a new release from Github releases page with the next semantic version.
- Run
scripts/updatevbranch.sh <tag>
with the release version tag to update the v* branch with the new tag.