Skip to main content

Enabling automatic access to GitHub.com actions using GitHub Connect

To allow GitHub Actions in your enterprise to use actions from GitHub.com, you can connect your enterprise instance to GitHub Enterprise Cloud.

Quem pode usar esse recurso?

Enterprise owners can enable access to public GitHub.com actions.

Observação: no momento, não há suporte para os executores hospedados no GitHub no GitHub Enterprise Server. Você pode ver mais informações sobre o suporte futuro planejado no GitHub public roadmap.

About automatic access to GitHub.com actions

By default, GitHub Actions workflows on GitHub Enterprise Server cannot use actions directly from GitHub.com or GitHub Marketplace. To make all actions from GitHub.com available on your enterprise instance, you can use GitHub Connect to integrate GitHub Enterprise Server with GitHub Enterprise Cloud.

Para usar ações do GitHub.com,, o sua instância do GitHub Enterprise Server e os executores auto-hospedados precisam ter a capacidade de fazer conexões de saída com o GitHub.com. Nenhuma conexão de entrada de GitHub.com é necessária. Para obter mais informações. Para obter mais informações, confira "Sobre executores auto-hospedados".

Alternatively, if you want stricter control over which actions are allowed in your enterprise, you can manually download and sync actions onto your enterprise instance using the actions-sync tool. For more information, see "Manually syncing actions from GitHub.com."

About resolution for actions using GitHub Connect

Quando um fluxo de trabalho usa uma ação, fazendo referência ao repositório onde a ação é armazenada, GitHub Actions primeiro tentará encontrar o repositório em sua instância do GitHub Enterprise Server. Se o repositório não existir em sua instância do GitHub Enterprise Server e se você tiver acesso automático para GitHub.com habilitado, GitHub Actions tentará encontrar o repositório em GitHub.com.

If a user has already created an organization and repository in your enterprise that matches an organization and repository name on GitHub.com, the repository on your enterprise will be used instead of the GitHub.com repository. For more information, see "Automatic retirement of namespaces for actions accessed on GitHub.com."

Enabling automatic access to public GitHub.com actions

Before enabling access to public actions from GitHub.com for your enterprise, you must:

  1. No canto superior à direita de GitHub Enterprise Server, clique na sua foto do perfil e clique em Configurações da empresa.

    Captura de tela do menu suspenso que aparece quando você clica na foto de perfil no GitHub Enterprise Server. A opção "Configurações da empresa" está realçada em um contorno laranja escuro.

  2. Na barra lateral da conta corporativa, clique em GitHub Connect .

  3. Under "Users can utilize actions from GitHub.com in workflow runs", use the drop-down menu and select Enabled.

  4. Após habilitar GitHub Connect, você poderá usar políticas para restringir quais ações públicas podem ser usadas em repositórios na sua empresa. Para obter mais informações, confira "Enforcing policies for GitHub Actions in your enterprise".

Automatic retirement of namespaces for actions accessed on GitHub.com

When you enable GitHub Connect, users see no change in behavior for existing workflows because GitHub Actions searches sua instância do GitHub Enterprise Server for each action before falling back to GitHub.com. This ensures that any custom versions of actions your enterprise has created are used in preference to their counterparts on GitHub.com.

Automatic retirement of namespaces for actions accessed on GitHub.com blocks the potential for a man-in-the-middle attack by a malicious user with access to sua instância do GitHub Enterprise Server. When an action on GitHub.com is used for the first time, that namespace is retired in sua instância do GitHub Enterprise Server. This blocks any user creating an organization and repository in your enterprise that matches that organization and repository name on GitHub.com. This ensures that when a workflow runs, the intended action is always run.

After using an action from GitHub.com, if you want to create an action in sua instância do GitHub Enterprise Server with the same name, first you need to make the namespace for that organization and repository available.

  1. Em uma conta administrativa no GitHub Enterprise Server, no canto superior direito de qualquer página, clique em .

  2. Se você ainda não estiver na página "Administração do site", no canto superior esquerdo, clique em Administração do site.

  3. In the left sidebar, under Site admin click Retired namespaces.

  4. To the right of the namespace that you want use in sua instância do GitHub Enterprise Server, click Unretire.

  5. Go to the relevant organization and create a new repository.

    Tip: When you unretire a namespace, always create the new repository with that name as soon as possible. If a workflow calls the associated action on GitHub.com before you create the local repository, the namespace will be retired again. For actions used in workflows that run frequently, you may find that a namespace is retired again before you have time to create the local repository. In this case, you can temporarily disable the relevant workflows until you have created the new repository.