building-github-actions

How to use a custom github action from another repository in my organization?


I'm following the examples of a docker Github action to create my own action. I would like to keep the action in a private repository in my organization, and then re-use it from another repositories under the same organization.

The documentation states that "When an action is in a private repository, the action can only be used in workflows in the same repository" but, to my understanding, it doesn't cover how such actions behave in organization context - only in standalone repo context. Do I have to make it public and on the marketplace, just to be able to re-use it in my own private organization?

Does anyone have any experience setting up such an action?


Solution

  • Github has introduced a new repository sharing option, called internal. With internal repositories it is possible to share actions across repositories. Please note that only some types of organizational accounts are entitled to this visibility option.

    https://dev.to/n3wt0n/finally-custom-github-actions-in-internal-repos-4l91