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.
| Need | Mechanism | Why |
|---|---|---|
| Every service deploys through the same audited jobs | Reusable workflow in an internal repository | Callers get the jobs, runners and environments as defined centrally |
| A shared set of setup steps inside many jobs | Composite action | Steps run in the caller's job and share its workspace |
| New repositories should start with a sensible CI file | Workflow template in the .github repository | A starting point people copy and adapt |
| A security workflow must pass before merging anywhere | A ruleset that requires the workflow to pass | Enforced 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
- Allowed actions: enterprise actions plus selected actions, with actions created by GitHub ticked and the reviewed third-party actions listed as patterns.
- Pinning: require full-length commit SHAs, and require lockfiles in this organization so pins are recorded and reviewed.
- Blocking: add a pattern beginning with an exclamation mark for the retired action at enterprise level, so it is blocked in every organization.
- 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.
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.
| Symptom | Likely cause | First check |
|---|---|---|
| Job waits forever for a runner | No runner in an accessible group matches the runs-on labels | Labels and group access for the repository |
| Job queues for minutes every morning | Too few self-hosted runners at peak | Queue times in Actions insights; scale-out settings |
| Job cannot reach an internal API | IP allow list or network path | Static IPs for larger runners or Azure private networking |
| Self-hosted runner shows offline | Service stopped or the machine lost connectivity | The 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.
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.
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/nullReading 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
- The runners are online and idle, so the machines and the labels are not the problem.
- An enterprise runner group must be shared with organizations, and an organization can then limit it to repositories.
- 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.
- 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.
A repository has 140 organization secrets available. How many can a workflow use?
Show answer
The first 100, sorted alphabetically by name.
Which runner type works with Azure private networking?
Show answer
Larger runners.
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.
Create a free account to save your progress, take quizzes and earn a certificate.