I have created a workflow in XenitAB github organization where we manage among other things workflows for github: GitHub - XenitAB/azure-devops-templates: Collection of templates to use in Azure DevOps
Now I’m trying to use this from another organization together with self-hosted runners and hit allot of issues.
Issue one I can’t run on self-hosted runners in my own organization that calls on a workflow in another organization.
Doing so gives me the following error:
Called workflows cannot be queued onto self-hosted runners across organisations/enterprises. Failed to queue this job. Labels: 'self-hosted , linux '.
We thought that we had done something wrong in our runs-on definition and tried a bunch of things but the errors is actually correct you can’t reuse a workflow from one organization to another with a self-hosted runner. This is probably some security feature that I don’t understand.
I want to be able to do something in the open that other organizations use and for they in return want to speed up there pipelines with using self-hosted runners is something that I think you should be able to do.
But realizing this issue I imported the public repo: GitHub - XenitAB/azure-devops-templates: Collection of templates to use in Azure DevOps in to my secondary organization but did it private.
If you do that the workflow can’t find it even though we are in the same organization. Apparently it’s not supported to use private repositories with github workflows.
Making my imported repositories public I was then able to run my workflow with my self-hosted runners.
Managing imported repositories is kind of a pain so I thought why not fork it since I’m forced to have my repositories public any way.
But that don’t work, it seems like workflows don’t support being used from a fork it will give you this error:
handling usage of workflow "firstname.lastname@example.org": can't obtain workflow file: resolving repository ID from nwo: creating github client: unexpected response `404` from `https://internal-api.service.iad.github.net/repos/organization/azure-devops-templates/installation`
This isn’t so much of a question but I hope that other people having similar issues will see this post and they can jump over a few of the hopes that I went through.
I also hope that github makes it possible to call on workflows with repositories in other organizations without any issues in the near future.
If not I would like to see that I can call on private repositories from workflows
And if not that I should at least be able to use it from a fork so I don’t have to maintain the imported repository.