diff --git a/.github/workflows/ci3.yml b/.github/workflows/ci3.yml index 4eb7ca75969c..4d21d8ed15d3 100644 --- a/.github/workflows/ci3.yml +++ b/.github/workflows/ci3.yml @@ -112,6 +112,24 @@ jobs: PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} run: ./.github/ci3_success.sh + - name: Notify Slack on backport CI failure + if: failure() && startsWith(github.event.pull_request.head.ref, 'backport-to-') && endsWith(github.event.pull_request.head.ref, '-staging') + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + run: | + if [ -n "${SLACK_BOT_TOKEN}" ]; then + read -r -d '' data <\n" + } + EOF + curl -X POST https://slack.com/api/chat.postMessage \ + -H "Authorization: Bearer $SLACK_BOT_TOKEN" \ + -H "Content-type: application/json" \ + --data "$data" + fi + - name: Upload benchmarks if: env.SHOULD_UPLOAD_BENCHMARKS == '1' uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29