You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than copying and pasting from one workflow to another, you can make workflows reusable. You and anyone with access to the reusable workflow can then call the reusable workflow from another workflow.
At the moment, the "template" workflows from this repository are distributed to the other repositories by copying. Enhancements and fixes made in this repository must be manually copied to every repository that uses that workflow. The "reusable workflows" feature would allow us to maintain a single "called" copy of the significant content of a workflow in this repo.
Caller workflows
We will still need to host "caller" workflows in each of the project repositories, which consist of:
trigger configuration (the "reusable workflows" feature doesn't allow this configuration to be stored in the "called" workflow)
project-specific information, to be passed to the "called" workflow's inputs
calls to the "called" reusable workflows
Since that "caller" workflow content can be fairly significant and standardized, we might find that we benefit from "template" caller workflow that are hosted in this repo and distributed by copying the same as we do now.
Cost-benefit analysis
A significant amount of the content of many of the "template" workflows is actually in "assets" (most prominently the tasks), leaving the content of the workflows fairly minimal. We might discover that there really isn't much left in the "called" workflow once we have moved the trigger and project-specific data configurations to the "caller". In this case, the extra complexity might negate the benefit of reducing the burden of manually distributing an insignificant amount of fairly static content.
However, I think it is at least worth evaluating whether this is something we can use for some of the workflows.
Feature status
The "reusable workflows" feature is currently in beta, so it is probably best to wait until it is more mature before investing significant effort into it.
UPDATE: I don't see a note about it being beta in the docs anymore, so I guess it is in production now?
New workflows
If we find the need to create a new "template" workflow it should be given consideration, since the immediate payoff of using the feature from the start is higher than that of retrofitting existing workflows.
The text was updated successfully, but these errors were encountered:
GitHub Actions has a new feature that could be very useful for the "template" GitHub Actions workflows hosted in this repository:
https://docs.github.com/en/actions/learn-github-actions/reusing-workflows
At the moment, the "template" workflows from this repository are distributed to the other repositories by copying. Enhancements and fixes made in this repository must be manually copied to every repository that uses that workflow. The "reusable workflows" feature would allow us to maintain a single "called" copy of the significant content of a workflow in this repo.
Caller workflows
We will still need to host "caller" workflows in each of the project repositories, which consist of:
Since that "caller" workflow content can be fairly significant and standardized, we might find that we benefit from "template" caller workflow that are hosted in this repo and distributed by copying the same as we do now.
Cost-benefit analysis
A significant amount of the content of many of the "template" workflows is actually in "assets" (most prominently the tasks), leaving the content of the workflows fairly minimal. We might discover that there really isn't much left in the "called" workflow once we have moved the trigger and project-specific data configurations to the "caller". In this case, the extra complexity might negate the benefit of reducing the burden of manually distributing an insignificant amount of fairly static content.
However, I think it is at least worth evaluating whether this is something we can use for some of the workflows.
Feature status
The "reusable workflows" feature is currently in beta, so it is probably best to wait until it is more mature before investing significant effort into it.
UPDATE: I don't see a note about it being beta in the docs anymore, so I guess it is in production now?
New workflows
If we find the need to create a new "template" workflow it should be given consideration, since the immediate payoff of using the feature from the start is higher than that of retrofitting existing workflows.
The text was updated successfully, but these errors were encountered: