Skip to content

Daily build

Daily build #460

Workflow file for this run

name: Daily build
on:
schedule:
- cron: '30 2 * * *'
workflow_dispatch:
inputs:
ballerina_version:
description: 'Ballerina version'
required: true
default: '2201.10.0'
env:
BALLERINA_DISTRIBUTION_VERSION: 2201.10.0 # 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 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17.0.7
- name: Set up Ballerina
if: github.event_name == 'workflow_dispatch'
uses: ballerina-platform/[email protected]
with:
version: ${{ github.event.inputs.ballerina_version }}
- name: Set up Ballerina
if: github.event_name == 'schedule'
uses: ballerina-platform/[email protected]
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\"
}
}"