Reusing workflow in private repo (from same repo) #25719
|
I know that Reusable Workflows are hamstrung by the fact that they cannot be reused across private repositories within an organization. But as it’s referenced a few times in the above links and the error message, workflows should be reusable in a private repository if the caller/called workflow is in the same repo:
From the docs. I cannot get this to work. Could someone please show me an example of this working, or point out what I’m doing wrong. I’ve scrubbed+simplified the example below so know that I’m not actually using the literal value
This yields the following error: These two files sit right next to each other in the same repo: |
Replies: 7 comments 5 replies
|
I’m convinced this just doesn’t work. I’ve created a public repo that has a trivial example for reusable workflows: GitHub - iautom8things/test_reusable_workflowsContribute to iautom8things/test_reusable_workflows development by creating an account on GitHub. If I create a private repo and copy these two files and simply change the repo name to the newly created private repo, it fails: So either I’m missing something, which is certainly possible. Or the documentation is wrong and resusable workflows just don’t work with private repositories . |
|
I had a similar issue with a corporate internal repo. Apparently the This post tipped me off:
Reusing GitHub Action workflow steps inside another job
github, continuous-integration, github-actions
asked by
Duncan Luk
on 11:48AM - 17 Nov 21 UTC
Not sure if that is what you’re running into, but wanted to share in case it was. Wes |
|
Thank you. I don’t believe this is my issue since both my username and the repository names are all lowercase. I’ve come to the conclusion that Github has no intentions of making these features available and usable to non-enterprise users. |
|
Hi, GitHub Actions: Reusable workflows can be referenced locally |GitHub Actions: Reusable workflows can be referenced locally Maybe if to use not org path but local one it will work for you. |
|
I think its only two ways how it could work if not to talk about Enterprise where it can be used from internal repo:s as well.
|
|
Hi @kolesnikovd
https://docs.github.com/en/actions/using-workflows/reusing-workflows#access-to-reusable-workflows |
|
This is possible now , need to update the access settings of private repo that holds the workflow to allow access across organization - https://docs.github.com/en/actions/creating-actions/sharing-actions-and-workflows-from-your-private-repository |





I think its only two ways how it could work
if not to talk about Enterprise where it can be used from
internalrepo:s as well.