Hey there, this blog post is my submission for the actions hackathon. I will be explaining the problem at first and then will reveal the GitHub action which solves the problem. Happy Reading!
Problem
I use IBM cloud foundry to host my cloud-native applications. Every time I changed the code, I had to re-deploy it again to cloud foundry via the CLI. I wanted to automate this process. My code is hosted on GitHub, and I was surprised to see that there were no GitHub actions available to deploy to Cloud foundry.
My Workflow
To solve this problem I built IBM Cloud Foundry Deploy which is a GitHub action. It allows you to deploy 🚀 the application to IBM cloud foundry seamlessly. We can deploy runtimes of Java, Node.js, PHP, Python, Ruby, ASP.NET, Tomcat, Swift and Go to Cloud Foundry.
What is Cloud Foundry?
Cloud Foundry is the industry-standard open source cloud application platform for developing and deploying enterprise cloud applications. Get started today!
For more information on IBM cloud foundry, please visit here.
Features Overview
The action supports both authentications using API key and using Username and Password.
Now you can seamlessly deploy your application to the IBM cloud foundry on every push.
The action's logic is independent of the trigger event. More precisely, most of the events that trigger the workflow like cron, push etc all are supported.
Submission Category:
DIY Deployments
Maintainer Must-Haves
Yaml File or Link to Code
Here is an example YAML snippet for the workflow to be run
name:Deploy to IBM Cloud Foundryon:push:branches:[master]jobs:build:runs-on:ubuntu-lateststeps:-uses:actions/checkout@v2-name:Deploy MyAppuses:subhamx/ibm-cloud-foundry-deploy@masterwith:# For Users who have opted for auth using Email & PasswordEMAIL:${{ secrets.USER_EMAIL }}PASSWORD:${{ secrets.USER_PASSWORD }}# For Users who have opted for Authentication using API KEYAPI_KEY:${{ secrets.IBM_API_KEY }}# Cloud Foundry API EndpointCF_API_ENDPOINT:${{ secrets.CF_API_ENDPOINT }}# Path to manifest.ymlMANIFEST_FILE_PATH:'./src/manifest.yml'# Cloud Foundry ORG NameORG:${{ secrets.ORG }}# Cloud Foundry Space Name for the specified ORGSPACE:${{ secrets.SPACE }}
🚀 A Github Action which allows developers to deploy the application to IBM cloud foundry seamlessly.
IBM Cloud Foundry Deploy
A github action which allows developers to automate the deploy 🚀 process to IBM cloud foundry.
What is Cloud Foundry?
Cloud Foundry is the industry-standard open source cloud application platform for developing and deploying enterprise cloud applications. Get started today!
For more information on IBM cloud foundry, please visit here.
Pre-requisites
You need to have an IBM Cloud account and a cloud foundry instance.
You can create a free IBM Cloud account here and create a new cloud foundry instance here.
Checklist
This action allows you to deploy applications built on runtimes of Java, Node.js, PHP, Python, Ruby, ASP.NET, Tomcat, Swift and Go to Cloud Foundry
You need to define your deployment details like number of application instances to create, the amount of memory and disk quota to allocate, and other environment variables in the manifest.yml…
Head over to this repo which hosts a simple NodeJS application, and uses this action to deploy the application to IBM Cloud on every push to master branch.