Replies: 2 comments
-
Any pointers here? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Bumping this - interested to know if there's any way to handle this (especially so I can take advantage of dependabot automatically upgrading my workflow versions). |
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
In our org we have several reusable workflows, which are useful to be able to both manually initiate on the source repository, and reuse in another repository.
The internal logic of the workflows relies on code commited to the repository that hosts the reusable workflow.
Currently to be able to use this reusable workflow in a versioned way, we have to tag the workflow with the version when it is used, and also pass in a special
ref
argument to the workflow to define the ref which should be checked out.This is then used for the checkout action like this:
The hardcoding of the repo-name is less of an issue, but not having to pass the ref twice (in the tag for the reusable workflow and the ref argument) would be a nice improvement.
I thought I had found the solution for this when I discovered the
github.action_ref
andgithub.action_repository
context variables, but on trying this, I discovered that this did not work for reusable workflows, and the action_ref and action_repository ended up referring to the workflow that the reusable workflow was invoked from within.Is there another solution for this without instead creating a custom action? Are the current referents of action_ref and action_repository in reusable workflows intentional?
For an example of this, see our reusable workflow here: https://github.com/learningequality/kolibri-installer-windows/blob/main/.github/workflows/build_exe.yml#L49
Beta Was this translation helpful? Give feedback.
All reactions