From the course: Advanced GitHub Actions

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Composite actions

Composite actions

- [Instructor] As you automate multiple projects in GitHub, you may start to see a pattern in your workflows. With every new project you set up, you find yourself adding the same steps to the workflow. You can use composite actions to keep from copying and pasting the same code over and over again. Essentially, you'll create an action definition that combines all the steps you want to use. Then you can use that one reference to run all of the steps defined in the action. Keeping your composite action in a repo lets you centralize changes. Making a change in one place allows workflows that reference the action to easily pick up the changes. The configuration for composite actions looks a lot like one you might see with an action that calls a Docker file. It's stored in a filename, action.yml or action.yaml. You give it a name, a description and optionally, you can add inputs and outputs. For the runs configuration, the…

Contents