Skip to main content

Configuring Dependabot on self-hosted runners

You can configure self-hosted runners that Dependabot uses to access your private registries and internal network resources.

¿Quién puede utilizar esta característica?

Administradores de repositorios y propietarios de la organización

Prerequisites

  • Dependabot is installed and enabled.
  • GitHub Actions is enabled and in use.

Al aplicar una directiva para permitir acciones y flujos de trabajo reutilizables en su empresa, y habilitar Dependabot en GitHub Actions, Dependabot no se ejecutará. Para permitir que Dependabot se ejecute con las acciones empresariales y los flujos de trabajo reutilizables, debe elegir permitir acciones creadas por GitHub, o permitir las acciones y flujos de trabajo reutilizables especificados. Para más información, consulta Requerir políticas para las GitHub Actions en tu empresa.

Adding self-hosted runners for Dependabot updates

  1. Provision self-hosted runners, at the repository or organization level. For more information, see Ejecutores autohospedados and Agrega ejecutores auto-hospedados.
  2. Configure your environment and runners to meet the requirements for Dependabot. See Requirements for using Dependabot with self-hosted runners.
  3. If you are configuring self-hosted runners for your organization, you can create and assign a custom label for your runners. Otherwise, if you are configuring self-hosted runners for a standalone repository, you need to apply the dependabot label. See Uso de etiquetas con ejecutores autohospedados.
  4. Optionally, enable workflows triggered by Dependabot to use more than read-only permissions and to have access to any secrets that are normally available. For more information, see Solución de problemas de Dependabot en acciones de GitHub.

Enabling self-hosted runners for Dependabot updates

Once you have configured self-hosted runners for Dependabot updates, you can enable or disable Dependabot updates on self-hosted runners at the organization or repository level.

Nota:

Disabling and re-enabling the "Dependabot on self-hosted runners" setting does not trigger a new Dependabot run.

For your private or internal repository

  1. En GitHub, navegue hasta la página principal del repositorio.

  2. Debajo del nombre del repositorio, haz clic en Settings. Si no puedes ver la pestaña "Configuración", selecciona el menú desplegable y, a continuación, haz clic en Configuración.

    Captura de pantalla de un encabezado de repositorio en el que se muestran las pestañas. La pestaña "Configuración" está resaltada con un contorno naranja oscuro.

  3. En la sección "Security" de la barra lateral, haz clic en Advanced Security.

  4. Under "Dependabot", to the right of "Dependabot on self-hosted runners", click Enable to enable the feature or Disable to disable it.

    Nota:

    If you do not see the option to enable Dependabot on self-hosted runners, your organization may have configured a policy to restrict actions and self-hosted runners from running in specific repositories. Contact your organization owner for more information.

For your organization

You can enable Dependabot on self-hosted runners for all existing private or internal repositories in an organization. Only repositories already configured to run Dependabot on GitHub Actions will be updated to run Dependabot on self-hosted runners the next time a Dependabot job is triggered.

  1. En la esquina superior derecha de GitHub, haz clic en la foto del perfil y luego en Your organizations.
  2. Junto a la organización, haga clic en Settings.
  3. En la sección "Security" de la barra lateral, haz clic en Advanced Security y después en Global settings.
  4. In the "Dependabot" section, next to "Runner type", click .
  5. Select the "Runner type" dropdown menu, then click Labeled runner and provide any additional information. If you applied a custom label to your self-hosted runners, type that label in the "Runner label" text box.
  6. To enable the feature for all new repositories in the organization, click Save runner selection.