Skip to content

Commit

Permalink
Merge pull request #28 from salamafazlul/main
Browse files Browse the repository at this point in the history
Add daily build workflow
  • Loading branch information
sameeragunarathne authored Jun 11, 2024
2 parents 786413c + 41286c8 commit 8109f6b
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow runs daily to build Ballerina projects.
name: Daily build

on:
schedule:
- cron: '30 20 * * *' # 02:00 AM in LK time (GMT+5:30)
workflow_dispatch:

env:
BALLERINA_VERSION: 2201.9.0

jobs:
build:
name: Build Ballerina Projects
runs-on: ubuntu-latest
env:
JAVA_OPTS: -Xmx4G

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set Up Ballerina
uses: ballerina-platform/setup-ballerina@v1.1.0
with:
version: $BALLERINA_VERSION

- name: Build Ballerina Projects
run: |
# Find Ballerina Project Folders
BALLERINA_PROJECT_FOLDERS=$(find . -name "Ballerina.toml" -printf '%p\n' | sed 's/\/Ballerina.toml$//' | sort -u | tr '\n' ' ')
# Convert BALLERINA_PROJECT_FOLDERS to an array
read -r -a BALLERINA_PROJECTS <<<"${BALLERINA_PROJECT_FOLDERS}"
# Build With Ballerina
for folder in "${BALLERINA_PROJECTS[@]}"; do
pushd "$folder"
bal build
popd
done
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# healthcare-samples

![Daily Build](https://github.com/ballerina-guides/healthcare-samples/actions/workflows/daily-build.yml/badge.svg)

This repository contains a collection of healthcare-related samples written in Ballerina.

## how to build?
Expand Down

0 comments on commit 8109f6b

Please sign in to comment.