reusable-workflows icon indicating copy to clipboard operation
reusable-workflows copied to clipboard

Add functionality for vars to be used in workflow reference

Open Wade9320 opened this issue 1 year ago • 0 comments

It would be great if there was functionality when using a reusable workflow instead of supplying the branch name or tag name but instead using an environment variable.

The advantage of this is that it would allow teams to version their templates, and also rollback the usage of template much quicker. GitLab supports this functionality through their templates.

Below is an example of what it would look like

jobs:
  tflint-tf:
    uses: example-org/github-actions-templates/.github/workflows/terraform-lint.yml@${{ vars.TEMPLATE_VERSION }}

This var would be set at an Organisation level.

Wade9320 avatar Jul 25 '24 09:07 Wade9320