Skip to content

Commit

Permalink
Extend workflow to check breaking changes on repository dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedSabthar committed May 23, 2022
1 parent 9d2baa9 commit 8c37ec8
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: CI

on: [push]
on:
push:
branches:
- '**'
repository_dispatch:
types:
check_connector_for_breaking_changes

jobs:
build:
Expand Down Expand Up @@ -39,3 +45,18 @@ jobs:
echo "Covered Lines : ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}}"
echo "Total Code Lines : $(expr ${{fromJson(steps.test_results.outputs.testResultsJson).missedLines}} + ${{fromJson(steps.test_results.outputs.testResultsJson).coveredLines}})"
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-googleapis.calendar",
"workflow": "CI"
}
}'

0 comments on commit 8c37ec8

Please sign in to comment.