Reuse workflow: dynamic branch reference (github.ref_name) #24661
-
Hello, When using reuse workflow, we need to mention the branch to reference the yml workflow. is working: This is not working when I use the predefined variable (github.ref_name) to dynamcally ref the branch: uses: Company/myRepo/.github/workflows/wf.yml@${{github.ref_name}} Is someone tried to make this working ? Regards |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Technically yes, the GitHub team is working on making it possible to use reusable workflow files from the current branch:
Hey everyone - I’m the product manager for reusable workflows. We’re currently working on the local reference scenario. It should be available in the next couple of weeks. Here’s how it will work: If a reusable workflow is located in the same repository as the caller, you can reference it with a local path: {path}/{filename}. We’ll automatically use the current ref. Here’s an example that shows the two ways you’ll have to reference a reusable workflow: jobs: call-workflow-1: uses: .gi… Which of course implies it’s not possible right now. 😅 |
Beta Was this translation helpful? Give feedback.
-
Hi Github Team, Is there any update on this particular feature in GitHub action related to dynamic branch referencing. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Technically yes, the GitHub team is working on making it possible to use reusable workflow files from the current branch: