CI / CD
Github
Post
Simplify Ballerina Workflow on GitHub with setup-ballerina Action
The post covers the use of the setup-ballerina
GitHub Action to automate the installation of the Ballerina (Swan Lake) distribution in the GitHub Action environment.
The following code block shows how you can configure the GitHub Action to build your Ballerina project. You can find a working example of this in this repository.
- The
setup-ballerina
GitHub Actionv1
release requires a mandatory input of the Ballerina Swan Lake distribution version in the form of “Swan Lake channel” as listed in thebal dist list
command. i.e.2201.5.0
,2201.6.0
, etc. This will install Ballerina on workflow environment andbal
command is added to thePATH
. - This action is supported on Ubuntu, MacOS, and Windows, and facilitates easy integration of Ballerina into your GitHub workflow.
- After you install Ballerina command, you can use
run
to execute thebal
command.
With the introduction of setup-ballerina
, users now have the option to choose between ballerina-action
and setup-ballerina
for using Ballerina in their GitHub Actions workflows.
This provides greater flexibility and choice for users, allowing them to choose the option that best suits their specific workflow needs. A comparison of the two options can help users make an informed decision based on factors such as Architecture and full bal
command support.
GitHub Action | setup-ballerina | ballerina-action |
---|---|---|
Architecture | Composite Actions | Docker container |
Supported Ballerina Versions | Swan Lake | 1.x and Swan Lake |
Full bal Command Support | Yes | Limited to bal build and bal push |
In summary, setup-ballerina provides more flexibility and full bal command support. The choice of which action to use ultimately depends on your specific needs and workflow requirements.
Originally, setup-ballerina was one of my pet projects that have now been officially part of the Ballerina platform.
Table of Content
Key Words
📃 This article was originally published on Dev.to Community blog.