From f97e74e5239627345b71ee07b9022ad63766c580 Mon Sep 17 00:00:00 2001 From: MohamedSabthar Date: Mon, 23 May 2022 12:40:34 +0530 Subject: [PATCH 1/2] Extend workflow to check breaking changes on repository dispatch --- .github/workflows/ci.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a99c1d9b..dabd291a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,15 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + repository_dispatch: + types: + check_connector_for_breaking_changes jobs: build: @@ -76,3 +85,18 @@ jobs: - name: Code Coverage run: | echo "Code Coverage Percentage : ${{fromJson(steps.test_results.outputs.testResultsJson).coveragePercentage}}" + + - name: Allert notifier on failure + if: failure() && (github.event.action == 'check_connector_for_breaking_changes') + run: | + curl -X POST \ + 'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \ + --header 'Accept: application/vnd.github.v3+json' \ + --header 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ + --data-raw '{ + "event_type": "notify-ballerinax-connector-build-failure", + "client_payload": { + "repoName": "module-ballerinax-mongodb", + "workflow": "CI" + } + }' \ No newline at end of file From 304b8de11ef908225976c250a9fda63ec1c491ae Mon Sep 17 00:00:00 2001 From: MohamedSabthar Date: Mon, 23 May 2022 15:52:03 +0530 Subject: [PATCH 2/2] Fix the typo in ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dabd291a..90a83719 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: run: | echo "Code Coverage Percentage : ${{fromJson(steps.test_results.outputs.testResultsJson).coveragePercentage}}" - - name: Allert notifier on failure + - name: Alert notifier on failure if: failure() && (github.event.action == 'check_connector_for_breaking_changes') run: | curl -X POST \