Member-only story
Trigger multiple workflows simultaneously in GitHub Actions from master workflow using matrix strategy
While working on an E-commerce application consisting of ~25 NodeJS microservices, I came across a requirement to optimize and speed up the process of microservice deployments. Every time Operations team is tasked with Stage or higher environment deployments, they were spending majority of time on below 2 tasks-
- Prepare a list of microservices along with versions marked for deployments. For this task they have to manually go to 25 GitHub repositories and extract the version from package.json file with a chance of manual error.
- Use the list prepared in #1 and manually trigger the GitHub Actions one by one for 25 microservices
Both the above steps took ~2-3 hours per deployment and we had minimum ~5 deployments per week (across Stage, Perf, Prod environments with blue/green nodes) resulting into 10–15 hours per week of time spent just for deployment activities. And it was a repeated set of tasks which was annoying Operations team.
In order to optimize and speedup the deployment process, I applied below strategy -
- Cut out a RC branch from develop in all 25 repositories with unique branch name
- Prepare a json file with a list of microservices that are marked for deployment with an option to provide a specific version tag. Upload the json file in respective environment folder