check_connector_for_breaking_changes #1282
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily build | |
on: | |
repository_dispatch: | |
types: | |
check_connector_for_breaking_changes | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17.0.7 | |
# Build the project with Gradle | |
- name: Build with Gradle | |
env: | |
packageUser: ${{ github.actor }} | |
packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
./gradlew clean build -P buildUsingDocker=nightly -x :nats-compiler-plugin-tests:test -x :nats-ballerina-tests:test | |
# Send notification when build fails | |
- name: Notify failure | |
if: ${{ failure() }} | |
run: | | |
eventType="notify-build-failure" | |
if [[ "${{ github.event.action }}" == "check_connector_for_breaking_changes" ]]; then | |
eventType="notify-ballerinax-connector-build-failure" | |
fi | |
curl -X POST \ | |
'https://api.github.com/repos/ballerina-platform/ballerina-release/dispatches' \ | |
-H 'Accept: application/vnd.github.v3+json' \ | |
-H 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ | |
--data "{ | |
\"event_type\": \"$eventType\", | |
\"client_payload\": { | |
\"repoName\": \"module-ballerinax-nats\", | |
\"workflow\": \"Daily build\" | |
} | |
}" |