Reusable workflows internal repositories feature removal?

Hello,

I noticed 2 docs have a bit of different info. One is saying reusable workflows work with internal repositories and the second one doesn’t.

1st link Reusing workflows - GitHub Docs

A reusable workflow can be used by another workflow if either of the following is true:

- Both workflows are in the same repository.
- The called workflow is stored in a public repository.

2nd link Reusing workflows - GitHub Docs

A reusable workflow can be used by another workflow if any of the following is true:

- Both workflows are in the same repository.
- The called workflow is stored in a public repository.
- The called workflow is stored in an internal repository and the settings for that repository allow it to be accessed. For more information, see "Managing GitHub Actions settings for a repository."

Anyone who could elaborate on this? I just spent 2 hours setting this up in our org and it seems it was for nought. I get:

error parsing called workflow "org/reusable-workflows/.github/workflows/tf_wf.yml@develop": 
Workflows in 'org/my-repo' cannot access remote workflows in 'org/reusable-workflows'. 
See https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#access-to-reusable-workflows for more information.

Thanks,
Sasa

1 Like

It seems that reusable workflows for internal repositories are exclusively for enterprise users Reusing workflows - GitHub Docs

1 Like

This seems incorrect. The document you link to has two points in regards to access:

  • The called workflow is stored in a public repository.
  • The called workflow is stored in an internal repository and the settings for that repository allow it to be accessed. For more information, see “Managing GitHub Actions settings for a repository.”

By my reading, private repos should work as long as the workflow’s repo is accessible.

I think it’s a terminology confusion: internal and private are not the same. A repository can be

  • public: visible to anyone
  • private: visible only to the owner (e.g. org admins) and collaborators
  • internal: visible to anyone in the org (enterprise account)
1 Like

Hello,

So since you are on GitHub Enterprise Cloud you can put a reusable worflow in a internal repository, and use it in other repositories of you organization and/or enterprise, but you must give access/permissions.

  1. Go to you Reusable Workflow repository (the one that contains the workflow you want to call)
  2. Click on Settings
  3. Click on Actions
  4. Go at the bottom of the configuration page, in the Access section
  5. Then select the proper option

This should now allow your “caller” repository to call the reusable workflow.

Regards
Tug

5 Likes