MSBA-299 · Lesson 7 of 12 · 21 min

Domain review: Actions management

▶ Video coming soon A video version of this lesson is on the way.

Actions was the domain Priya felt safest in, which was exactly why Wren chose to make the Thursday, November 19 session uncomfortable. "You can write a workflow in your sleep," she said. "This domain does not ask you to write one. It asks you to decide which workflows an enterprise lets people run, on which machines, with which secrets. You have been on the receiving end of those decisions at Tidewater. Today you make them." Yevgenia Kowalczyk-Arce, Skerry's build infrastructure lead, joined the call for the second half to show the runner groups she had set up.

Domain 4, Manage GitHub Actions, is weighted 20 to 25 percent. Its three objective groups are configuring workflows and reusable components, managing runners, and managing encrypted secrets. MSBA-291 lessons 5 and 6 taught the enterprise side of this material; the GH-200 courses, MSBA-300 to MSBA-302, go deeper into authoring and securing workflows for anyone who wants more.

Reuse across the enterprise

The first bullet asks you to configure and manage reuse of actions and workflows for the enterprise. There are three mechanisms, and the exam expects you to choose between them. A reusable workflow is a whole workflow that other workflows call with uses at job level, passing inputs and secrets. A composite action packages steps that run inside a caller's job. A workflow template is a starting point offered to people creating new workflows, stored in the organization's .github repository; it is copied, not called, so later changes to the template do not reach copies already made.

Sharing from private and internal repositories needs a setting. By default, actions and reusable workflows in a private repository can be used only by that repository. On the repository's Actions settings, its admins can make them accessible to other repositories in the organization, or, for internal repositories, in the enterprise. Skerry keeps its shared deployment workflows in an internal platform-workflows repository with access granted across the enterprise, versioned with tags so callers can pin a release.

NeedMechanismWhy
Every service deploys through the same audited jobsReusable workflow in an internal repositoryCallers get the jobs, runners and environments as defined centrally
A shared set of setup steps inside many jobsComposite actionSteps run in the caller's job and share its workspace
New repositories should start with a sensible CI fileWorkflow template in the .github repositoryA starting point people copy and adapt
A security workflow must pass before merging anywhereA ruleset that requires the workflow to passEnforced centrally, not dependent on each repository's files

Organization and enterprise policies for Actions

The second bullet asks you to apply organization policies for GitHub Actions. Enterprise owners decide which organizations may use Actions at all, and then the same set of policies cascades down: an enterprise can enforce a value or leave it to organizations, and organizations can restrict further for their repositories. The allowed actions policy has three broad settings: allow all actions and reusable workflows; allow only those in the enterprise; or allow those in the enterprise plus a selected set, such as actions created by GitHub, actions by verified Marketplace creators and actions matching listed patterns. Patterns accept wildcards, and a pattern starting with an exclamation mark blocks a match even if another pattern allows it.

Several newer policy settings show up in questions. Owners can require actions to be pinned to a full-length commit SHA, so that a moved tag cannot change what runs; reusable workflows may still be referenced by tag. Lockfiles, generally available since October 28, 2026, record the exact commit of every action a repository uses, satisfy the pinning requirement and can be required by policy. Workflow execution protections, generally available since September 2026, add rules about which actors and which events may run workflows, with an evaluate mode for trying them out. Default GITHUB_TOKEN permissions are read-only for accounts created since February 2023, and Actions cannot create or approve pull requests unless an owner allows it. Retention for artifacts and logs defaults to 90 days and can be set from 1 to 90 days for public repositories and up to 400 days for private ones.

Fork pull requests have their own settings. For public repositories, owners choose when workflows from outside contributors need approval before they run. For private and internal repositories, owners choose whether workflows from forks run at all, and whether they receive write tokens or secrets, which they should rarely do. GitHub has also announced that, from December 2, 2026, workflows triggered by pull_request_target in public repositories will be blocked by default unless an event policy allows them; private and internal repositories and Enterprise Server are not affected. That date falls after this course was written, so check the changelog for how it rolled out.

Worked problem

Choosing an allowed actions setting

Skerry's skerry-stores organization holds point-of-sale code. The security lead wants only actions from the enterprise, actions created by GitHub and a short list of reviewed third-party actions, pinned so that a moved tag cannot change them. One third-party action that passed review last year must now be blocked everywhere. What should be set?

Show solution
  1. Allowed actions: enterprise actions plus selected actions, with actions created by GitHub ticked and the reviewed third-party actions listed as patterns.
  2. Pinning: require full-length commit SHAs, and require lockfiles in this organization so pins are recorded and reviewed.
  3. Blocking: add a pattern beginning with an exclamation mark for the retired action at enterprise level, so it is blocked in every organization.
  4. Changes go through the governance repository so the decision and its reason are recorded.

Answer: Allow enterprise and selected actions, require SHA pinning and lockfiles in skerry-stores, and block the retired action with an exclamation-mark pattern at enterprise level.

Runners

The second objective group is about runners, the machines that run jobs. GitHub-hosted runners are virtual machines GitHub provides fresh for each job. Larger runners are GitHub-hosted runners with more cores, GPUs, Arm processors or Windows and Linux images of the enterprise's choosing, and can have static IP address ranges or Azure private networking. Self-hosted runners are machines the customer runs, on premises or in its own cloud, which can reach internal systems and special hardware; they can be ephemeral, taking one job and then being replaced, and can be scaled in Kubernetes with Actions Runner Controller.

Runner groups control who can use which runners. A group is created at enterprise or organization level, holds runners, and is shared with selected organizations or repositories; it can also be limited to selected workflows, so that only an approved deployment workflow can use the group that reaches production. The default group is shared widely, which is why sensitive runners belong in their own group. Yevgenia's groups at Skerry were hosted-standard, data-gpu, stores-lab, stores-deploy and azure-private, each named for what it was allowed to reach.

Three runner types on the left: standard GitHub-hosted runners, larger runners and self-hosted runners. Arrows lead into runner groups in the middle: hosted-standard shared with all organizations; azure-private holding larger runners injected into an Azure virtual network; stores-deploy holding self-hosted ephemeral runners limited to one deployment workflow and the skerry-stores organization. On the right, the resources each group can reach: the public internet, private Azure resources through the virtual network, and store systems on premises.
Runner types, runner groups and what each group can reach.

The networking bullet names IP allow lists and Azure private networking. If an enterprise has an IP allow list, the addresses of GitHub-hosted runners are not predictable, so jobs that call back into the enterprise's own API can fail. The options are to give larger runners static IP ranges and add those to the list, or to use self-hosted runners at known addresses. Azure private networking lets an enterprise owner create a network configuration that places larger runners' network interfaces in the company's Azure virtual network, so jobs reach private resources and follow the network's security group rules. It works with larger runners only, not standard hosted runners, and organizations inherit enterprise configurations unless an owner lets them create their own. GitHub recommends a stable outbound IP for such runners if an IP allow list is in use.

The last runner bullet asks you to monitor and troubleshoot runner performance. The signs are long queue times, jobs that wait for a runner that never arrives, and jobs that run slowly. The usual causes are a label in runs-on that no runner in the available groups matches, a runner group not shared with the repository, too few self-hosted runners for the load, or an offline runner. The runner list shows each runner's status, and organization insights for Actions show usage and performance over time, including queue times by runner type.

SymptomLikely causeFirst check
Job waits forever for a runnerNo runner in an accessible group matches the runs-on labelsLabels and group access for the repository
Job queues for minutes every morningToo few self-hosted runners at peakQueue times in Actions insights; scale-out settings
Job cannot reach an internal APIIP allow list or network pathStatic IPs for larger runners or Azure private networking
Self-hosted runner shows offlineService stopped or the machine lost connectivityThe runner's own logs and its host

Encrypted secrets

The third objective group covers secrets. Secrets can be stored at organization, repository and environment level. An organization secret can be shared with all repositories, with private and internal repositories only, or with selected repositories. A repository secret belongs to one repository. An environment secret is available only to jobs that reference the environment, after its protection rules, such as required reviewers, have been met. When the same name exists at several levels, the most specific wins: environment over repository over organization.

Three nested scopes: organization secrets shared with all, private or selected repositories; repository secrets; environment secrets gated by protection rules. An arrow shows precedence from environment to repository to organization. To the side, a separate path: a job with id-token write permission requests an OIDC token from GitHub and exchanges it with an external vault for a short-lived secret, with no long-lived secret stored in GitHub.
Secret scopes and precedence, and the vault path that avoids storing long-lived secrets at all.

Limits are concrete enough to be asked: up to 1,000 organization secrets, 100 repository secrets and 100 environment secrets; each secret up to 48 KB; and if a repository can see more than 100 organization secrets, a workflow can use only the first 100 sorted by name. Secret names may use only letters, numbers and underscores, must not start with GITHUB_ or a number, and are not case-sensitive. Workflows triggered by pull requests from forks do not receive secrets by default, and a reusable workflow receives only the secrets its caller passes, individually or with inherit.

The final bullet asks you to integrate third-party vaults. The modern pattern avoids storing a long-lived credential in GitHub at all. A job with the id-token: write permission requests an OpenID Connect token from GitHub, the vault or cloud provider checks its claims, such as repository, branch and environment, against a trust policy, and returns a short-lived credential or secret. HashiCorp Vault, Azure Key Vault, AWS Secrets Manager and similar services support this. Skerry replaced 170 stored cloud keys with OIDC trust policies in MSBA-291.

A job using OIDC to sign in to Azure and read a secret from Key Vault, with no stored cloud credential. Identifiers are configuration variables, not secrets. Action versions change; check the current release.
permissions:
  id-token: write
  contents: read

jobs:
  deploy:
    runs-on:
      group: stores-deploy
    environment: production
    steps:
      - uses: azure/login@v2
        with:
          client-id: ${{ vars.AZURE_CLIENT_ID }}
          tenant-id: ${{ vars.AZURE_TENANT_ID }}
          subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
      - name: Read the store gateway key from Key Vault
        run: |
          az keyvault secret show --vault-name skr-stores-kv \
            --name gateway-key --query value -o tsv > /dev/null

Reading Actions questions as an administrator

Priya noticed during practice that Actions questions in GH-100 almost never asked what a line of YAML did. They asked where a control should live. When a stem said "across all organizations", the answer was an enterprise policy or an enterprise runner group. When it said "only the deployment workflow", the answer was a runner group limited to selected workflows or an environment with protection rules. When it said "without storing credentials", the answer was OIDC. When it said "developers should not be able to change", the answer was something enforced above the repository, such as a policy or a ruleset that requires a workflow, rather than a file in the repository that its admins could edit.

Worked problem

A runner that nobody can use

Yevgenia adds four new self-hosted runners with the label pos-build to a runner group called stores-lab, created at enterprise level. Jobs in skerry-stores that ask for runs-on: [self-hosted, pos-build] wait in the queue and never start. The runners show as idle. What is the most likely cause?

Show solution
  1. The runners are online and idle, so the machines and the labels are not the problem.
  2. An enterprise runner group must be shared with organizations, and an organization can then limit it to repositories.
  3. If stores-lab has not been shared with skerry-stores, or skerry-stores has not made it available to the repository, no job there can see those runners.
  4. A workflow restriction on the group would also block jobs from workflows that are not on its list.

Answer: The group's access settings: share stores-lab with the skerry-stores organization, allow the repository, and check any selected-workflow restriction. Labels match; access does not.

Lena, quizzing Priya that evening, added one of her own from GH-200: a job that needs secrets from an environment must name the environment, and the environment's required reviewers must approve before those secrets are released. "Same control, seen from the other side," she said. Priya added it to her flash cards with a note on which exam owned which side.

Common mistakes

  • MistakeExpecting changes to a workflow template to reach repositories that used it.

    InsteadTemplates are copied; reusable workflows are called and change centrally.

  • MistakePutting a production deployment runner in the default runner group.

    InsteadUse a dedicated group limited to the right organizations, repositories and workflows.

  • MistakeAdding standard GitHub-hosted runner addresses to an IP allow list.

    InsteadUse larger runners with static IPs or self-hosted runners at known addresses.

  • MistakeUsing Azure private networking with standard hosted runners.

    InsteadIt works with larger runners only.

  • MistakeStoring a cloud key as an organization secret for every repository.

    InsteadUse OIDC with trust policies, or scope the secret to selected repositories or an environment.

Summary and key terms

  • Reusable workflows are called, composite actions run inside jobs and templates are copied; private and internal repositories must share actions explicitly.
  • Allowed actions, SHA pinning, lockfiles, fork settings, token defaults and retention cascade from enterprise to organization to repository and can only be tightened.
  • Runner groups decide which organizations, repositories and workflows can use which runners; keep sensitive runners out of the default group.
  • IP allow lists need static runner addresses; Azure private networking places larger runners in a company virtual network.
  • Secrets live at organization, repository and environment level with the most specific winning; OIDC lets jobs get short-lived credentials from vaults.
Reusable workflow
A workflow called by other workflows at job level, maintained in one place.
Allowed actions policy
The setting that controls which actions and reusable workflows may run.
Runner group
A set of runners shared with chosen organizations, repositories and workflows.
Larger runner
A GitHub-hosted runner with more resources and options such as static IPs or private networking.
Environment secret
A secret available only to jobs that reference an environment after its protection rules pass.
OpenID Connect (OIDC)
A standard that lets a job prove its identity to a cloud or vault and receive short-lived credentials.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. A repository has 140 organization secrets available. How many can a workflow use?

    Show answer

    The first 100, sorted alphabetically by name.

  2. Which runner type works with Azure private networking?

    Show answer

    Larger runners.

  3. Which permission must a job have to request an OIDC token?

    Show answer

    id-token: write.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz