GitHub Actions für Deine Organisation Deaktivieren oder Einschränken

Organisationsinhaber können GitHub Actions für eine Organisation deaktivieren, aktivieren oder einschränken.

Über GitHub Actions-Berechtigungen für Deine Organisation

By default, GitHub Actions is enabled on all repositories and organizations. You can choose to disable GitHub Actions or limit them to private actions only, which means that people can only use actions that exist in your repository. Weitere Informationen zu GitHub Actions findest Du unter „Über GitHub Actions."

Du kannst GitHub Actions für alle Repositories in Deiner Organisation aktivieren. Wenn Du GitHub Actions aktivierst, können Workflows Aktionen ausführen, die sich in Deinem Repository und jedem anderen öffentlichen Repository befinden. Du kannst GitHub Actions für alle Repositorys in Deiner Organisation deaktivieren. Wenn Du GitHub Actions deaktivierst, werden keine Workflows in Deinem Repository ausgeführt.

Alternativ kannst Du GitHub Actions für alle Repository in Deiner Organisation aktivieren, aber die Aktionen limitieren, die ein Workflow ausführen kann. When you enable local actions only, workflows can only run actions located in your repository, organization, or enterprise.

GitHub Actions-Berechtigungen für Deine Organisation verwalten

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. In the top right corner of GitHub, click your profile photo, then click Your organizations. Your organizations in the profile menu
  2. Next to the organization, click Settings. The settings button
  3. Klicke in der linken Seitenleiste auf Actions (Aktionen).
  4. Under Policies, select an option. Set actions policy for this organization
  5. Klicke auf Save (Speichern).

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 GitHub Marketplace 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 GitHub Marketplace.

  • 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. In the top right corner of GitHub, click your profile photo, then click Your organizations. Your organizations in the profile menu
  2. Next to the organization, click Settings. The settings button
  3. Klicke in der linken Seitenleiste auf Actions (Aktionen).
  4. Under Policies, select Allow select actions and add your required actions to the list. Add actions to allow list
  5. Klicke auf Save (Speichern).

Enabling workflows for private repository forks

If you rely on using forks of your private repositories, you can configure policies that control how users can run workflows on pull_request events. 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.

  • Run workflows from fork pull requests - Allows users to run workflows from fork pull requests, using a GITHUB_TOKEN with read-only permission, and with no access to secrets.
  • Send write tokens to workflows from pull requests - Allows pull requests from forks to use a GITHUB_TOKEN with write permission.
  • Send secrets to workflows from pull requests - Makes all secrets available to the pull request.

Configuring the private fork policy for an organization

  1. In the top right corner of GitHub, click your profile photo, then click Your organizations. Your organizations in the profile menu
  2. Next to the organization, click Settings. The settings button
  3. Klicke in der linken Seitenleiste auf Actions (Aktionen).
  4. Under Fork pull request workflows, select your options. Ein Beispiel: Aktiviere, deaktiviere oder limitiere die Aktionen für dieses Repository
  5. Click Save to apply the settings.

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. In der oberen rechten Ecke von GitHub klicke auf Dein Profilfoto und dann auf your profile (Dein Profil). Profilfoto
  2. In the top right corner of GitHub, click your profile photo, then click Your organizations. Your organizations in the profile menu
  3. Next to the organization, click Settings. The settings button
  4. Klicke in der linken Seitenleiste auf Actions (Aktionen).
  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

Oder, learn how to contribute.