Skip to content

Pull Request Builder #654

Pull Request Builder

Pull Request Builder #654

name: Pull Request Builder
on:
workflow_dispatch:
schedule:
- cron: "0 20 * * *"
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cache Ballerina.
uses: actions/cache@v3
id: cache
with:
path: "ballerina-dist/*.deb"
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Download Ballerina distribution.
shell: sh
run: |
mkdir -p ballerina-dist
wget 'https://dist.ballerina.io/downloads/2201.3.0/ballerina-2201.3.0-swan-lake-linux-x64.deb' -P ballerina-dist
if: steps.cache.outputs.cache-hit != 'true'
- name: Install Ballerina distribution.
shell: sh
run: "sudo dpkg -i ballerina-dist/ballerina-2201.3.0-swan-lake-linux-x64.deb"
- name: Verify Ballerina Version
shell: sh
run: "bal -v"
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Install Revive
shell: sh
run: |
go install github.com/mgechev/revive@latest
- name: Checkout apk-repo
uses: actions/checkout@v3
with:
fetch-depth: "0"
- name: Run build-apk.sh
run: |
sh build-apk.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3