Disabling or limiting GitHub Actions for your organization

Organization owners can disable, enable, and limit GitHub Actions for an organization.

About GitHub Actions permissions for your organization

Predeterminadamente, GitHub Actions se encuentra habilitado en todos los repositorios y organizaciones. Puedes elegir inhabilitar las GitHub Actions o limitarlas para las acciones privadas únicamente, lo cual significa que las personas solo podrá utilizar las acciones que existan en tu repositorio. For more information about GitHub Actions, see "About GitHub Actions."

You can enable GitHub Actions for all repositories in your organization. Cuando habilitas GitHub Actions, los flujos de trabajo puede ejecutar acciones ubicadas dentro de tu repositorio y en cualquier otro repositorio público. You can disable GitHub Actions for all repositories in your organization. Cuando inhabilitas a GitHub Actions, no se ejecuta ningún flujo de trabajo en tu repositorio.

Alternatively, you can enable GitHub Actions for all repositories in your organization but limit the actions a workflow can run. Cuando habilitas únicamente las acciones locales, los flujos de trabajo solo pueden ejecutar acciones ubicadas en tu repositorio u organización.

Managing GitHub Actions permissions for your organization

You can disable all workflows for an organization or set a policy that configures which actions can be used in an organization.

If you choose Allow select actions, local actions are allowed, and there are additional options for allowing other specific actions. For more information, see "Allowing specific actions to run."

When you allow local actions only, the policy blocks all access to actions authored by GitHub. For example, the actions/checkout would not be accessible.

Note: You might not be able to manage these settings if your organization is managed by an enterprise that has overriding policy. For more information, "Enforcing GitHub Actions policies in your enterprise account."

  1. En la parte izquierda de tu página de perfil, debajo de "Organizaciones", da clic en el icono de tu organización. iconos de organización
  2. Next to the organization, click Settings. The settings button
  3. En la barra lateral izquierda, da clic en Acciones. Configuración de acciones
  4. Under Policies, select an option. Set actions policy for this organization
  5. Click Save.

Allowing specific actions to run

When you choose Allow select actions, local actions are allowed, and there are additional options for allowing other specific actions:

  • Allow actions created by GitHub: You can allow all actions created by GitHub to be used by workflows. Actions created by GitHub are located in the actions and github organization. For more information, see the actions and github organizations.

  • Allow Marketplace actions by verified creators: You can allow all Mercado GitHub actions created by verified creators to be used by workflows. When GitHub has verified the creator of the action as a partner organization, the badge is displayed next to the action in Mercado GitHub.

  • Allow specified actions: You can restrict workflows to use actions in specific organizations and repositories.

    To restrict access to specific tags or commit SHAs of an action, use the same <OWNER>/<REPO>@<TAG OR SHA> syntax used in the workflow to select the action. For example, actions/javascript-action@v1.0.1 to select a tag or actions/javascript-action@172239021f7ba04fe7327647b213799853a9eb89 to select a SHA. For more information, see "Finding and customizing actions."

    You can use the * wildcard character to match patterns. For example, to allow all actions in organizations that start with space-org, you can specify space-org*/*. To add all actions in repositories that start with octocat, you can use */octocat*@*. For more information about using the * wildcard, see "Workflow syntax for GitHub Actions."

    Note: The Allow specified actions option is only available in public repositories with the GitHub Free, GitHub Pro, GitHub Free for organizations, or GitHub Team plan.

This procedure demonstrates how to add specific actions to the allow list.

  1. En la parte izquierda de tu página de perfil, debajo de "Organizaciones", da clic en el icono de tu organización. iconos de organización
  2. Next to the organization, click Settings. The settings button
  3. En la barra lateral izquierda, da clic en Acciones. Configuración de acciones
  4. Under Policies, select Allow select actions and add your required actions to the list. Add actions to allow list
  5. Click Save.

Configuring required approval for workflows from public forks

Anyone can fork a public repository, and then submit a pull request that proposes changes to the repository's GitHub Actions workflows. Although workflows from forks do not have access to sensitive data such as secrets, they can be an annoyance for maintainers if they are modified for abusive purposes.

To help prevent this, workflows on pull requests to public repositories from some outside contributors will not run automatically, and might need to be approved first. By default, all first-time contributors require approval to run workflows. You can configure this behavior for an organization using the procedure below. Modifying this setting overrides the configuration set at the enterprise level.

  1. En la parte izquierda de tu página de perfil, debajo de "Organizaciones", da clic en el icono de tu organización. iconos de organización

  2. Next to the organization, click Settings. The settings button

  3. En la barra lateral izquierda, da clic en Acciones. Configuración de acciones

  4. Under Fork pull request workflows from outside collaborators, select your option. The options are listed from least restrictive to most restrictive.

    Setting for approval for workflows from public forks

  5. Click Save to apply the settings.

For more information about approving workflow runs that this policy applies to, see "Approving workflow runs from public forks."

Enabling workflows for private repository forks

Si dependes en el uso de bifurcaciones de tus repositorios privados, puedes configurar las políticas que controlan cómo los usuarios pueden ejecutar flujos de trabajo en los eventos de pull_request. Available to private repositories only, you can configure these policy settings for enterprise accounts, organizations, or repositories. For enterprise accounts, the policies are applied to all repositories in all organizations.

  • Ejecutar flujos de trabajo desde las solicitudes de extracción de las bifurcaciones - permite a los usuarios ejecutar flujos de trabajo desde las solicitudes de extracción de las bifurcaciones utilizando un GITHUB_TOKEN con permisos de solo lectura y sin acceso a los secretos.
  • Enviar tokens de escritura a los flujos de trabajo desde las solicitudes de extracción - Permite a las solicitudes de extracción de las bifuraciones utilizar un GITHUB_TOKEN con permiso de escritura.
  • Enviar secretos a los flujos de trabajo desde las solicitudes de extracción - Pone disponibles todos los secretos de la solicitud de extracción.

Configuring the private fork policy for an organization

  1. En la parte izquierda de tu página de perfil, debajo de "Organizaciones", da clic en el icono de tu organización. iconos de organización
  2. Next to the organization, click Settings. The settings button
  3. En la barra lateral izquierda, da clic en Acciones. Configuración de acciones
  4. Debajo de Bifurcar los flujos de trabajo de la solicitud de extracción, selecciona tus opciones. Por ejemplo: Habilita, inhabilita o limita las acciones para este repositorio
  5. Da clic en Guardar para aplicar la configuración.

Setting the permissions of the GITHUB_TOKEN for your organization

You can set the default permissions granted to the GITHUB_TOKEN. For more information about the GITHUB_TOKEN, see "Authentication in a workflow." You can choose between a restricted set of permissions as the default or a permissive setting.

You can set the default permissions for the GITHUB_TOKEN in the settings for your organization or your repositories. If you choose the restricted option as the default in your organization settings, the same option is auto-selected in the settings for repositories within your organization, and the permissive option is disabled. If your organization belongs to a GitHub Enterprise account and the more restricted default has been selected in the enterprise settings, you won't be able to choose the more permissive default in your organization settings.

Anyone with write access to a repository can modify the permissions granted to the GITHUB_TOKEN, adding or removing access as required, by editing the permissions key in the workflow file. For more information, see permissions.

Configuring the default GITHUB_TOKEN permissions

  1. En la esquina superior derecha de GitHub, da clic en tu foto de perfil, posteriormente, da clic en Tu perfil. Foto de perfil
  2. En la parte izquierda de tu página de perfil, debajo de "Organizaciones", da clic en el icono de tu organización. iconos de organización
  3. Next to the organization, click Settings. The settings button
  4. En la barra lateral izquierda, da clic en Acciones. Configuración de acciones
  5. Under Workflow permissions, choose whether you want the GITHUB_TOKEN to have read and write access for all scopes, or just read access for the contents scope. Set GITHUB_TOKEN permissions for this organization
  6. Click Save to apply the settings.

Did this doc help you?Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

O, learn how to contribute.