Daily build #507
This file contains hidden or 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: '30 2 * * *' | |
| workflow_dispatch: | |
| inputs: | |
| ballerina_version: | |
| description: 'Ballerina version' | |
| required: true | |
| default: '2201.10.3' | |
| env: | |
| BALLERINA_DISTRIBUTION_VERSION: 2201.10.3 # Update this with the latest Ballerina version | |
| 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.0.3 | |
| - name: Set up Ballerina | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: ballerina-platform/setup-ballerina@v1.1.3 | |
| with: | |
| version: ${{ github.event.inputs.ballerina_version }} | |
| - name: Set up Ballerina | |
| if: github.event_name == 'schedule' | |
| uses: ballerina-platform/setup-ballerina@v1.1.3 | |
| with: | |
| version: ${{ env.BALLERINA_DISTRIBUTION_VERSION }} | |
| - name: Build with Gradle | |
| env: | |
| packageUser: ${{ github.actor }} | |
| packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ./gradlew clean build | |
| - name: Upload Codecov Report | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ballerina-tests/zipkin-server-tests/target/report/zipkin_server_tests/coverage-report.xml | |
| - name: Run Trivy vulnerability scanner | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| scan-type: 'rootfs' | |
| scan-ref: "${{ github.workspace }}/ballerina/lib" | |
| format: 'table' | |
| timeout: '10m0s' | |
| exit-code: '1' | |
| - name: Notify failure | |
| if: ${{ failure() }} | |
| 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-build-failure\", | |
| \"client_payload\": { | |
| \"repoName\": \"module-ballerinax-zipkin\" | |
| } | |
| }" |