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.

<code>setup-ballerina</code> in action

  • The setup-ballerina GitHub Action v1 release requires a mandatory input of the Ballerina Swan Lake distribution version in the form of “Swan Lake channel” as listed in the bal dist list command. i.e. 2201.5.0, 2201.6.0, etc. This will install Ballerina on workflow environment and bal command is added to the PATH.
  • 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 the bal 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 Actionsetup-ballerinaballerina-action
ArchitectureComposite ActionsDocker container
Supported Ballerina VersionsSwan Lake1.x and Swan Lake
Full bal Command SupportYesLimited 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.

 February 20, 2023

Table of Content

Key Words

📃 This article was originally published on Dev.to Community blog.
Ballerina Actions
 February 20, 2023

Table of Content

Key Words

📃 This article was originally published on Dev.to Community blog.

Navigation

Site Settings

Site Theme

Source Code Density