CI/CD Cloud Workflows with GitHub Actions and Ballerina

Anjana Fernando
May 9, 2019 · 2 min read
Image for post
Image for post

GitHub has introduced the ability to execute custom workflows for events you generate within GitHub using GitHub Actions. For instance, using this functionality, you can implement CI/CD using GitHub’s infrastructure itself. No need to subscribe for a special service to build/test and deploy your application, but rather these can be done in GitHub itself, with the actions defined by us, or the extensive list of actions already available.

Ballerina has also implemented its own GitHub Action by allowing the Ballerina CLI commands to be accessible as an action. The Ballerina GitHub Action lives in this repo. You will be able to find examples there on its usage. GitHub Actions are at the moment in beta status, and you have to request for an invite in order to use it. If you already have access, great, please give it a try. For others who are interested in seeing it in action, I have created a walkthrough video with some patterns on how this functionality can be used. The scenarios consist of Ballerina applications, that will build/test/deploy automatically with each git commit/push. The deployment scenarios that we will be looking at are:

  • Ballerina Kubernetes Deployment
  • AWS Lambda Deployment
  • Ballerina Module Deployment to Ballerina Central
Ballerina GitHub Actions Demo

The samples used for the above demo can be found in the below locations:

Ballerina-Techblog

Anjana Fernando

Written by

Author of ‘Beginning Ballerina Programming’ | Software Developer | Evangelist | 🇱🇰 🇺🇸 | Director — Developer Relations @wso2 — @lafernando

Ballerina-Techblog

The Ballerina Tech Blog

Anjana Fernando

Written by

Author of ‘Beginning Ballerina Programming’ | Software Developer | Evangelist | 🇱🇰 🇺🇸 | Director — Developer Relations @wso2 — @lafernando

Ballerina-Techblog

The Ballerina Tech Blog

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store