Daily build #3591
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: | |
schedule: | |
- cron: '0 */12 * * *' | |
repository_dispatch: | |
types: | |
check_connector_for_breaking_changes | |
jobs: | |
build: | |
if: github.repository_owner == 'ballerina-platform' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 17.0.7 | |
- name: Set environment variable | |
if: github.event.action == 'check_connector_for_breaking_changes' | |
run: | | |
echo "BUILD_USING_DOCKER=true" >> $GITHUB_ENV | |
echo "GRADLE_SKIP_TASKS=-x :azure.functions-compiler-plugin-tests:test" >> $GITHUB_ENV | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '17.0.7' | |
distribution: 'graalvm-community' | |
components: 'native-image' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
set-java-home: 'false' | |
- name: Build with Gradle | |
env: | |
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} | |
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} | |
run: | | |
./gradlew clean build -PnativeTest --scan --no-daemon $GRADLE_SKIP_TASKS | |
- name: Generate Codecov Report | |
uses: codecov/codecov-action@v1 | |
# Send notification when build fails | |
- name: Notify 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' \ | |
-H 'Accept: application/vnd.github.v3+json' \ | |
-H 'Authorization: Bearer ${{ secrets.BALLERINA_BOT_TOKEN }}' \ | |
--data "{ | |
\"event_type\": \"notify-ballerinax-connector-build-failure\", | |
\"client_payload\": { | |
\"repoName\": \"module-ballerinax-azure.functions\", | |
\"workflow\": \"Daily build\" | |
} | |
}" |