-
Notifications
You must be signed in to change notification settings - Fork 33
53 lines (46 loc) · 1.78 KB
/
daily-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Daily build
on:
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 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 21
- name: Set environment variable
if: github.event.action == 'check_connector_for_breaking_changes'
run: |
echo "BUILD_USING_DOCKER=-PbuildUsingDocker=nightly" >> $GITHUB_ENV
echo "GRADLE_SKIP_TASKS=-x :aws.lambda-compiler-plugin-tests:test" >> $GITHUB_ENV
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- 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 $BUILD_USING_DOCKER
- 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-aws.lambda\",
\"workflow\": \"Daily build\"
}
}"