-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from salamafazlul/main
Add daily build workflow
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 | ||
This file contains 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