feature request: calling reusable, parameterize uses with Github context #122442
Unanswered
Trikenstein
asked this question in
Actions
Replies: 1 comment
-
Switched the category of this post from |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
There is a past discussion Reusable workflow/actions name and references. My question is slightly different, as well as the error msg returned by the GH workflow runner.
We have multiple code repositories calling reusable workflows (RWF) which we maintain in a private repo. Example: below calling
a RWF at the reference
@v1
Let's say we made an improvement of the RFW, committed it and tag it as
v2
. The client workflow would need to update its own workflow to reference the new tagv2
The issue is that we need to make such update on many client repos. And in case we need to revert back to the previous version of the RFWs, we would need to undo the change on as my client repos.
We would like to control the remote reference via a Github variable named
PIPELINE_VERSION
in this example. With this approach, we can set the default ref defined in a variable at the org level. When testing newer RWF version, we just need to override the org variable by a repo variable, same name but with a different value. The advantage of this design is to allow to roll out, fallback RWFs without making any change in the workflow files of client code repos.But the above syntax is invalid. The workflow failed to execute with error message
Maybe there is a way to parameterize the remote reference, if there is none, would this feature request be reasonable?
FYI, this concept is possible with GitLAB pipeline syntax. All you need is to parameterize the
ref
attribute. Here is a working example of a client pipeline.gitlab-ci.yml
)Beta Was this translation helpful? Give feedback.
All reactions