Demo repository for reusable workflow
- ❗ This is a template repository
- ❗ This demo contains GHEC/GHES-specific features
- The Reusable Workflow feature is only available for GHEC, GHES (>=v3.4), and public repositories
- If you have a GHEC organization available, then please click Use this template to clone the repo into that organization
- If you do not have a GHEC organization available, please run the demo in this repository. Just make sure to complete the Cleanup steps afterwards 🏡
- In the repository, go to Settings --> Environments
- Create an environment (e.g.
test
)- No additional settings
- Create another environment (e.g.
prod
)- Add a required reviewer (you can set yourself as the required reviewer)
- The protection rules will be used later in the demo
💡 Ensure that environments added above corresponds to what is defined in the caller workflow's inputs.
- Walk through syntax of
.github/workflows/caller.yml
- Demo how it defines a callee workflow
- Walk through syntax of
.github/workflows/callee.yml
- Go to the Actions tab, select
Caller Workflow
then trigger the wokflow mannually viaRun Workflow
- Select environment to run as
test
orprod
- Select environment to run as
- If Required reviewers were added to the environment, the workflow should be halted until it is reviewed
- Show how to review a deployment, and ensure the job proceeds
- Show logs and how callee workflow is ingested params passed by caller workflow
- If the workflow was run in this repository, perform the following steps:
- Delete all environments created