Member-only story
GitHub Actions: A Comparison between Composite Actions and Reusable Workflow

Since the Introduction of Github Actions in 2018, many organizations have moved their CI/CD workload from third-party solutions into Github. This is due to the proximity of code to CI/CD workflow which improves the software delivery experience and efficiency.
In a previous article, I emphasized the concept of DRY (Don’t Repeat Yourself). I also introduced Mono Chart; a technique to avoid Helm Chart repetition in Kubernetes deployment. This time, we will explore another application of the DRY principle in CI/CD. This time we shall compare two options that exist in Github Actions. Which are:
- Composite Action
- Reusable Action
First, let's begin with the definition of a Composite Action.
What is a Composite Action
According to Github Documentation: Composite actions allow you to collect a series of workflow job steps into a single action which you can then run as a single job step in multiple workflows.
What is a Reusable Workflow
According to Github Documentation: Reusable workflows provide another way of avoiding duplication (aka DRY), by allowing you to run a complete workflow from within other workflows.