Pass the GH-200 Exam with these GitHub Actions Practice Tests
Whenever I prep for a certification exam, I don’t aim to scrape by. I gear up to own the exam room.
If you want to ace the GitHub Actions GH-200 certification exam, use a plan that makes exam day feel familiar, not scary. Here’s the approach I use and how I adapt it for GitHub Actions.
GitHub Actions GH-200 exam
I wanted to sit the GH-200 GitHub Actions exam with the same confidence I’ve had on other certifications. I’ve heard that the GitHub Actions exam rewards people who practice in real repos, read YAML carefully, and know how to debug. So the plan leans into hands-on reps and fast feedback.
Here’s a five step strategy that works:
- Thoroughly read the stated exam objectives and align your study plan
- Start with practice questions to learn the exam style
- Take a structured course and reinforce with short labs
- Do focused hands-on projects that mirror the blueprint
- Use the final weekend for full-length practice tests and review
Add a calm exam-day routine and you’ll boost your chance of passing on the first attempt.
Step 1: Read the exam objectives
Begin with the GH-200 blueprint. Map your study to the four domains:
• Author and maintain workflows — 40%
• Consume workflows — 20%
• Author and maintain actions — 25%
• Manage GitHub Actions in the enterprise — 15%
Translate those into a checklist:
Author and maintain workflows
– Triggers: push, pull_request, schedule, workflow_dispatch, and common webhooks like check_run and DevOps deployments
– Jobs and steps: valid YAML, conditionals, needs, matrices, and runner communication with workflow commands
– Security: secrets, env, default variables, and GITHUB_TOKEN
– Delivery work: publish to Packages and GHCR, use service containers, route jobs with labels, add CodeQL, create releases, and deploy to AWS, Azure of the GCP cloud
Consume workflows
– Read a workflow and infer effects, find the trigger, and diagnose failures with logs and history
– Caching dependencies, passing data between jobs, handling artifacts, status badges, environment protections, approvals, and templated workflows
Author and maintain actions
– Pick the right action type: JavaScript, Docker, or composite/run step
– Files and metadata, inputs and outputs, toolkit usage, workflow commands, exit codes, and enterprise troubleshooting
Manage Actions in the enterprise
– Reusable templates, distribution and access control, organization policies
– Work with Scrum Teams, Product Owners and Jira-like systems
– Runner strategy: GitHub-hosted vs self-hosted, labels, groups, networking, proxies, monitoring, and updates
– Secret scopes at org and repo levels
Step 2: Do practice questions before you study
Before you take a course or even get hands on, go over some practice questions just so you get a good idea of what is being tested and what you have to learn.
Learn the wording, spot patterns, and note weak areas.
Early practice teaches you to read YAML like code, notice indentation problems, catch bad conditionals, and recognize trigger side effects. Keep a miss log and tag each miss by domain so your next session is targeted.
If you’d like to get started preparing for the GitHub Foundations exam, start by working through the hundreds of free certification exam questions here:
Free GitHub Actions GH-900 Practice Exams
For those interested in a GitHub Actions course, the official Udemy GitHub Actions Practice Tests are highly recommended. GitHub Foundations and GitHub Copilot Udemy exams are also available for those who want to obtain a trifecta of GitHub certifications.
Step 3: Take a course
Pick a course that walks the domains in order and pairs each lesson with a lab. Keep labs tiny and frequent so you build muscle memory. Short, consistent sessions beat long, occasional grinds. Aim for daily reps that cover triggers, matrices, secrets, runners, and logs.
Step 4: Do simple hands-on projects in GitHub Actions
Do hands-on work to cement your understanding of key topics. Keep it small and fast and learn quickly.
• Triggers tour: one workflow that runs on push, one on pull_request, one on schedule, and one with workflow_dispatch
• YAML drills: add jobs, steps, needs, and an if condition that only runs on pull_request from forks
• Secrets and env: use GITHUB_TOKEN, a repo secret, and a job-level env; print default env vars safely to understand scope
• Caching and artifacts: cache dependencies and upload a build artifact; download it in a second job
• Matrix build: run a matrix across two OSes and two Node versions; mark a job as continue-on-error to see behavior
• Service containers: spin up a database container and run integration tests against it
• Packages and GHCR: publish a package or container image from a tagged release build
• CodeQL: add a code scanning job and surface alerts in the Security tab
• Reusable workflows: extract a common build into .github/workflows/reusable.yml and call it from two repos
• Actions authoring: write a tiny JavaScript action that echoes an input, then a Docker action that prints the runner OS
• Runners: label a self-hosted runner in a sandbox and route a job to it with runs-on and labels
• Approvals and protections: require environment approvals before deploy and add a status badge to the README
These mirror GH-200 scenarios and teach you to debug fast.
Step 5: Get serious about mock exams
Block focused sessions for full-length mocks. Review every answer, not just the misses. Write why the correct option works and why the distractors don’t. Sort misses by root cause: YAML syntax, trigger choice, env and secrets scope, runner selection, or enterprise controls. Redo weak domains the next day, then re-test.
Your exam day strategy
• Read the YAML and the question stem slowly. Match the symptom to the trigger, job, or step in play
• Eliminate distractors that violate YAML rules, misuse secrets scope, or pick the wrong trigger
• Prefer secure and maintainable defaults when requirements allow, like GITHUB_TOKEN over long-lived personal tokens
• Flag time sinks, finish a first pass, then come back for deep reads of logs and run-history questions
• Answer everything. A blank can’t score
• Use later questions as clues. A matrix or runner detail in one item can jog your memory for another
Stick to this plan, keep your labs tight, and review with intent. By the time you sit GH-200, the YAML will read like a story, the logs will make sense at a glance, and runner choices will feel automatic.
GitHub Certification Practice Exam Questions
All exam question come from my GitHub Action Udemy course and certificationexams.pro
A workflow at CityMail Inc runs on ubuntu-latest and triggers on pushes and pull requests to the “trunk” branch, and one step specifies uses as “actions/checkout” without any “@” reference or tag, so under GitHub Actions resolution rules which version of the checkout action will run?
-
❏ A. actions/checkout@v4
-
❏ B. actions/checkout@main
-
❏ C. The step is invalid because owner or repo and ref are required for uses and the workflow will fail
-
❏ D. The latest available release of the action
Leila manages credentials for GitHub Actions at RiverStone Analytics and needs to decide whether a sensitive API token should be stored as an organization secret or as an environment secret. Which considerations should guide this choice? (Choose 3)
-
❏ A. The Google Cloud region where related workloads run
-
❏ B. How many repositories will need the token
-
❏ C. Whether workflows must pass environment protections such as required reviewers before using the token
-
❏ D. The level of access separation needed for different teams or environments
At NovaRetail the platform team manages eleven self-hosted runners for GitHub Actions across two repositories in the mcnz.com organization. Some runners include GPUs and others have a licensed security scanner. They need a reliable way for certain workflow jobs to run only on runners with the required tools. In GitHub Actions what are custom labels primarily used for in this scenario?
-
❏ A. Improve runner security by enforcing access controls with labels
-
❏ B. Give workflow jobs descriptive names for easier monitoring
-
❏ C. Direct jobs to matching self-hosted runners by selecting labels that describe their capabilities
-
❏ D. Cloud Build
At Riverbend Labs you are releasing a reusable GitHub Action that many teams will consume across multiple repositories and you want a predictable approach to communicate change impact while allowing users to pin compatible releases. What practice should you adopt for versioning the action?
-
❏ A. Use timestamp based release names like 2025.10.04.1530 for each publication
-
❏ B. Use semantic versioning for action tags with the MAJOR.MINOR.PATCH scheme to signal compatibility
-
❏ C. Artifact Registry
-
❏ D. Reference only immutable Git commit SHAs instead of creating version tags
Stonebridge Systems uses GitHub Actions to deploy to multiple environments and needs to include a service account key that is about 60 KB, which exceeds the repository secret size limit. What is the most appropriate way to handle this oversized secret within their workflows?
-
❏ A. Store the credential in Google Secret Manager and retrieve it during the workflow run
-
❏ B. Place the entire 60 KB value directly into a repository secret to bypass the limit
-
❏ C. Encrypt the secret with GPG, commit the encrypted file to the repository, and keep the decryption passphrase as a GitHub secret
-
❏ D. Split the large value across several repository secrets and concatenate the parts in the workflow
An engineering team at Riverbend Analytics manages workflows in a GitHub repository and needs to enable step debug logging during troubleshooting. How should they configure ACTIONS_STEP_DEBUG so that the logs are generated, and which value is used if both a secret and a variable are defined?
-
❏ A. Set ACTIONS_STEP_DEBUG as either a repository secret or a repository variable and the variable value takes precedence if both are set
-
❏ B. Set ACTIONS_STEP_DEBUG as either a repository secret or a repository variable and the secret value takes precedence if both are set
-
❏ C. Cloud Logging
-
❏ D. Set ACTIONS_STEP_DEBUG only as a repository variable
Seaside Manufacturing must restrict access to internal APIs by using IP allowlists for jobs that run from GitHub Actions. About 80 percent of their pipelines use GitHub hosted runners and they require both Windows and macOS environments. How can they satisfy the allowlist requirement while keeping workflows dependable?
-
❏ A. Add all Azure public IP address ranges to the allowlist because GitHub hosted Windows and Ubuntu runners run in Azure
-
❏ B. Implement self hosted runners in the data center with fixed IP addresses added to the allowlist
-
❏ C. Use GitHub hosted larger runners that publish static egress IP ranges and add those ranges to your firewall allowlist
-
❏ D. Create separate workflows for internal access that run only on self hosted runners and remove IP allowlists
An engineer at scrumtuous.com is configuring a GitHub Actions workflow to build a container image and push it to GitHub Container Registry. Which registry domain should be used in the image name so that the push goes to GitHub Container Registry?
-
❏ A. github.com
-
❏ B. ghcr.io
-
❏ C. docker.pkg.github.com
-
❏ D. docker.io
A team at BlueDot Robotics is setting up continuous integration with GitHub Actions for a repository named automationpipeline and they plan to include an in repository custom action alongside marketplace actions. Which components must exist so that the workflow can run when changes occur? (Choose 3)
-
❏ A. Artifact Registry
-
❏ B. Trigger events that start the workflow
-
❏ C. A workflow definition written in YAML
-
❏ D. An action metadata file for a custom action
Your team at Orchard Metrics maintains a GitHub repository and you need a workflow to run whenever a new issue is created. Which on configuration will make the workflow execute when someone opens an issue?
-
❏ A. on: issues: types: [opened]
-
❏ B. All of these configurations
-
❏ C. on: issues
-
❏ D. on: issues: types: – opened
All exam question come from my GitHub Action Udemy course and certificationexams.pro
Your team at mcnz.com opens a new pull request in the payments app repository which triggers a GitHub Actions workflow. Where can the team view the status of that workflow run? (Choose 3)
-
❏ A. On the Issues tab of the repository
-
❏ B. On the Checks tab of the pull request
-
❏ C. From the Actions tab of the repository
-
❏ D. On the pull request page before it is merged
A small platform team at scrumtuous.com is getting ready to publish a custom GitHub Action. They want to know how the action’s metadata file will appear on the GitHub Marketplace listing. What does GitHub do with this metadata on the Marketplace page?
-
❏ A. GitHub converts the action metadata into a dedicated standalone page outside the repository
-
❏ B. GitHub auto generates a comprehensive usage guide from the metadata and replaces the repository README on the listing
-
❏ C. GitHub uses the action metadata to automatically fill the Marketplace listing with its title description branding and input and output details
-
❏ D. GitHub relies on the metadata only to organize actions into categories and language filters
Blue Harbor Media runs deployments to Google Cloud from GitHub Actions and plans to let workflows obtain credentials using OpenID Connect with Workload Identity Federation instead of storing a service account key as a repository secret. What is the primary benefit of this approach?
-
❏ A. Automatic deployment without any authentication
-
❏ B. Removal of the need to configure IAM roles and policies in Google Cloud
-
❏ C. Improved security by not keeping long lived credentials in repository secrets
-
❏ D. Faster workflow execution because authentication is skipped
As the enterprise administrator at BluePeak Systems you need to tightly control GitHub Actions usage across all organizations while still permitting critical internal workflows to run. Which configuration should you implement to meet these requirements?
-
❏ A. Disable GitHub Actions for every organization in the enterprise
-
❏ B. Allow all Marketplace actions while restricting which organizations and repositories can create workflows
-
❏ C. Enforce a policy that allows only local actions and approved reusable workflows from within the enterprise
-
❏ D. Cloud Build
At BlueFjord Logistics on example.com you manage a GitHub Actions workflow with three jobs. The package job declares a needs relationship on the build job. If the build job fails during execution, what happens to the workflow and to the package job?
-
❏ A. The dependent job is skipped while other unrelated jobs continue to run
-
❏ B. Only the failed job is retried automatically without stopping the workflow
-
❏ C. The workflow is marked as failed and the job that depends on it does not run
-
❏ D. Cloud Build takes over and executes the remaining steps
The platform team at scrumtuous.com is standardizing continuous integration on GitHub Actions across many repositories and wants to build reusable custom actions that developers can share across projects. Which action types can they use to implement these custom actions? (Choose 3)
-
❏ A. Composite actions
-
❏ B. Cloud Build
-
❏ C. Docker container actions
-
❏ D. JavaScript actions
Your engineering group at scrumtuous.com is setting up continuous integration with GitHub Actions to automate tests and deployments. During a design review someone asks what an action represents inside a GitHub workflow. How should you define an action in this context?
-
❏ A. It is a prebuilt workflow that GitHub publishes for common development tasks
-
❏ B. It is a reusable single task that you combine in a GitHub Actions workflow and you can build your own or use community provided ones
-
❏ C. It is a Google Cloud Build trigger that starts when you push to a branch
-
❏ D. It is an integrated plugin for Visual Studio Code that runs tests during editing
At BlueSky Analytics your GitHub Actions workflow builds and pushes a container image when code is merged into the “stable” branch and it authenticates using the GitHub token. The job sets an environment variable named REGISTRY to “ghcr.io” and the docker metadata step forms image names by joining REGISTRY with the repository path. Given this configuration which container registry will receive the pushed image?
-
❏ A. Docker Hub
-
❏ B. Google Artifact Registry
-
❏ C. GitHub Container Registry
-
❏ D. Amazon ECR
At Brightline Studio on example.com you are editing a GitHub Actions workflow for a repository and you want it to start when either a push or a pull request happens. Which top level YAML key in the workflow file designates the events that start the run?
-
❏ A. name
-
❏ B. runs-on
-
❏ C. on
-
❏ D. jobs
A small DevOps team at example.com is building reusable JavaScript actions for its GitHub workflows and wants consistent behavior on GitHub-hosted runners. Which statements accurately describe how JavaScript actions execute and recommended development practices? (Choose 3)
-
❏ A. JavaScript actions created with Node.js work across Ubuntu, Windows, and macOS GitHub-hosted runners
-
❏ B. JavaScript actions run in the runner process and rely on tools that already come with the runner image
-
❏ C. It is best practice to include compiled binaries alongside your JavaScript action so setup is easier and results are consistent
-
❏ D. Using the GitHub Actions Toolkit libraries can speed up authoring and testing of your action
All exam question come from my GitHub Action Udemy course and certificationexams.pro
Ravi is reviewing a failed GitHub Actions run in the Actions tab and he wants to open the YAML that defines the workflow used by that run directly from the run page. Which option in the failed run’s menu should he choose to view the workflow file quickly?
-
❏ A. Download log archive
-
❏ B. Create status badge
-
❏ C. View workflow file
-
❏ D. View raw logs
An engineering team at mcnz.com operates a self hosted GitHub Actions runner inside a restricted VPC where all outbound internet access must go through an HTTP proxy. Which environment variable should you set on the runner so it can successfully connect to GitHub?
-
❏ A. NO_PROXY
-
❏ B. HTTP_PROXY
-
❏ C. https_proxy
-
❏ D. network_proxy
NorthPeak Analytics hosts a repository on GitHub and uses GitHub Actions for delivery automation. They want a workflow to execute only when a release is published and it must not run for drafts, release creation, edits, or prereleases. Which trigger configuration should they add to the workflow file?
-
❏ A. on: release: types: [created]
-
❏ B. on: push: tags: [v*]
-
❏ C. on: release: types: [published]
-
❏ D. on: published
Northwind Apps created a reusable GitHub Action and wants it to appear on GitHub Marketplace so other teams can adopt it right away without manual review. Which prerequisites must be satisfied for the listing to go live immediately? (Choose 5)
-
❏ A. The name in the action metadata must be unique across GitHub Marketplace
-
❏ B. You must enable Cloud Build in your Google Cloud project before publishing
-
❏ C. The action’s metadata file named action.yml is located at the root of the repository
-
❏ D. The repository that hosts the action is public
-
❏ E. The listing name cannot match any existing GitHub Marketplace category
-
❏ F. You have accepted the terms of service for publishing actions in GitHub Marketplace
Your team maintains a GitHub Actions workflow named “release-flow” that runs when a push event occurs. It contains a job named “prod-deploy” that uses the condition github.repository == ‘orion-tech/web-prod’. The job includes steps that check out the code, set up Node.js version 18, and install the bats package globally using npm. If this workflow is triggered by a push to the orion-tech/web-staging repository, what will be true about the prod-deploy job?
-
❏ A. Cloud Build will run the deployment instead
-
❏ B. The prod-deploy job will execute all three configured steps
-
❏ C. The prod-deploy job will be marked as skipped
-
❏ D. The prod-deploy job will fail with a configuration error
At Riverbend Robotics the team reviews GitHub Actions workflow logs to learn what the platform adds automatically. For every job they want to identify the two system generated steps that always appear even when not defined in the workflow file. Which steps does GitHub include for each job during a run?
-
❏ A. Set up job and Tear down job
-
❏ B. Authenticate to Google Cloud and Upload artifacts to Cloud Storage
-
❏ C. Set up job and Complete job
-
❏ D. Checkout and Post-job cleanup
A DevOps team at Nova Retail adopts GitHub Actions to speed up dependency installation using the cache action. During a workflow run the specified cache key is not found. What will the cache action do in this situation?
-
❏ A. The action stops the workflow when the cache is missing
-
❏ B. The action searches other repositories to find a compatible cache
-
❏ C. The action saves a new cache at the end of the job if the run finishes successfully
-
❏ D. The action requires a maintainer to manually create or upload a cache before continuing
At Brightpath Labs you received a production credential used by the billing service, so you added it as a secret in the repository that hosts that service. Teams deploying from two other repositories report that their GitHub Actions workflows cannot read this secret during deployment. You want those repositories to use the same secret while keeping centralized control. What should you do?
-
❏ A. Store the credential in Google Secret Manager and have each workflow fetch it at runtime
-
❏ B. Make the existing repository secret visible to everyone in the organization
-
❏ C. Create an organization Actions secret and allow only the required repositories to use it
-
❏ D. Encode the value with Base64 and store it in the repo so other teams can copy it
A DevOps team at mcnz.com is building a GitHub Actions workflow to deploy a service to Google Cloud Run and they need the workflow steps to start quickly and remain simple across Ubuntu, macOS, and Windows runners. They are deciding whether to implement a JavaScript action or a Docker container action for a common task. Which benefit would a JavaScript action provide in this situation?
-
❏ A. Docker container actions ensure a consistent environment across operating systems which can increase reliability
-
❏ B. Cloud Build
-
❏ C. JavaScript actions execute directly on the runner so they usually start faster and keep action code simple
-
❏ D. Docker container actions provide stronger isolation and security boundaries than JavaScript actions
Your DevOps team at scrumtuous.com is refining a GitHub Actions workflow and wants to avoid a build step running forever. When you set the “timeout-minutes” field on that step, what exactly does this configuration control?
-
❏ A. It defines the upper limit for the entire job duration
-
❏ B. It enforces a per command time limit within the step and fails the step if any single command exceeds it
-
❏ C. It sets how long the workflow waits for an external trigger such as a webhook or approval before continuing
-
❏ D. It caps the total runtime of the step as a whole and cancels it once that duration is reached
Priya oversees GitHub Actions settings for Asteria Robotics and wants a single variable to be shared across several workflows. She can define it at the organization level, the repository level, and the environment level. If the same variable name exists at all three levels, which value will the workflow use when it runs in that environment?
-
❏ A. Organization level variable takes precedence
-
❏ B. The environment level variable overrides the others
-
❏ C. Repository level variable takes precedence
-
❏ D. Values are merged with no single winner
At mcnz.com your team needs one step in a GitHub Actions job to set a temporary environment variable and adjust PATH without changing any other steps in the job. How should you instruct the hosted runner during that step so the environment is customized only for that step?
-
❏ A. Set the environment key at the job level in the workflow file
-
❏ B. Cloud Build
-
❏ C. Emit workflow commands with the :: prefix from the step’s run script to change the runner environment for that step only
-
❏ D. Insert an additional setup step that exports variables for the job
Solstice Insights created a custom Docker container action for a GitHub Actions workflow that deploys resources to Google Cloud. A run failed because the workflow may not have passed expected environment variables such as “GOOGLE_PROJECT” and you want to see what variables are present inside the container at runtime. What should you do?
-
❏ A. Review the env section in the action.yml to verify the variables defined for the action
-
❏ B. Run docker inspect on the job container to view the environment configuration reported by Docker
-
❏ C. Run the env command from the container entrypoint to print all environment variables available at runtime
-
❏ D. Use Secret Manager to list the secret values and map them to the container environment
Orion Metrics has a team of 25 engineers who maintain CI pipelines with GitHub Actions and they are considering whether to define workflows in YAML or in JSON. Which statement accurately describes a syntactic behavior of YAML that differs from JSON for these workflow files?
-
❏ A. YAML requires every scalar string to be enclosed in quotation marks
-
❏ B. YAML disallows comments in workflow definitions
-
❏ C. YAML uses indentation and line breaks to represent structure while JSON defines structure with delimiters
-
❏ D. YAML permits literal tab characters for indentation
At BrightWave Media the delivery team plans to run CI jobs with GitHub-hosted runners while the security group at example.com requires an IP address allowlist for connectivity. Why could this requirement become burdensome for the operations staff?
-
❏ A. Cross team approvals could slow provisioning and scaling of CI builds
-
❏ B. GitHub does not publish any IP ranges for GitHub Actions runners
-
❏ C. They would need to run Cloud NAT to obtain static egress IPs for the runners which adds extra maintenance
-
❏ D. The allowlist must be updated often because GitHub-hosted runner IP ranges are large and change regularly
GitHub Practice Exam Questions Answered
All exam question come from my GitHub Action Udemy course and certificationexams.pro
A workflow at CityMail Inc runs on ubuntu-latest and triggers on pushes and pull requests to the “trunk” branch, and one step specifies uses as “actions/checkout” without any “@” reference or tag, so under GitHub Actions resolution rules which version of the checkout action will run?
-
✓ C. The step is invalid because owner or repo and ref are required for uses and the workflow will fail
The correct option is The step is invalid because owner or repo and ref are required for uses and the workflow will fail.
This happens because the uses key in GitHub Actions must specify an action in the format owner slash repo at ref. The ref is required and can be a tag, a branch, or a full commit SHA. When the @ref is omitted the workflow is considered invalid and it fails validation or at runtime. The operating system and the trigger conditions do not change this requirement.
actions/checkout@v4 is incorrect because GitHub Actions does not assume v4 by default. You only get v4 when you explicitly specify @v4 or a corresponding ref.
actions/checkout@main is incorrect because there is no default to the main branch when the @ref is missing. Using a floating branch is also discouraged for security reasons and it must be explicitly specified if chosen.
The latest available release of the action is incorrect because there is no automatic resolution to the newest release. You must provide an explicit ref to use any version.
Check the uses line for an explicit @ref. If it is missing then the step is invalid and there is no implicit default to main or latest.
Leila manages credentials for GitHub Actions at RiverStone Analytics and needs to decide whether a sensitive API token should be stored as an organization secret or as an environment secret. Which considerations should guide this choice? (Choose 3)
-
✓ B. How many repositories will need the token
-
✓ C. Whether workflows must pass environment protections such as required reviewers before using the token
-
✓ D. The level of access separation needed for different teams or environments
The correct options are How many repositories will need the token, Whether workflows must pass environment protections such as required reviewers before using the token, and The level of access separation needed for different teams or environments.
When many repositories consume the same credential, an organization secret centralizes management and can be scoped to selected repositories, which aligns with the first factor. If only one repository needs the token or each deployment context requires a different value, using an environment secret keeps the value tied to the specific environment where it is needed.
If access must be gated with approvals or wait timers before a job can read the token, environments provide protection rules that enforce those checks so the secret only becomes available after the gates have passed. Organization secrets do not add these workflow level gates.
If strong separation is needed between teams or deployment stages, environments help you isolate secrets per environment and control who can deploy to each. Organization secrets can still be limited to selected repositories, which supports team based boundaries across multiple repositories.
The Google Cloud region where related workloads run does not affect whether you should choose an organization secret or an environment secret because GitHub scoping is based on repositories and environments rather than cloud regions.
Identify the needed scope and any required protections first. Use an organization secret for broad reuse across repositories and use an environment secret when you need approvals or distinct values per environment.
At NovaRetail the platform team manages eleven self-hosted runners for GitHub Actions across two repositories in the mcnz.com organization. Some runners include GPUs and others have a licensed security scanner. They need a reliable way for certain workflow jobs to run only on runners with the required tools. In GitHub Actions what are custom labels primarily used for in this scenario?
-
✓ C. Direct jobs to matching self-hosted runners by selecting labels that describe their capabilities
The correct option is Direct jobs to matching self-hosted runners by selecting labels that describe their capabilities. This aligns with the need to ensure that jobs run only on machines with GPUs or a licensed security scanner.
In GitHub Actions you assign custom labels to self-hosted runners to describe their hardware and tools. A job then specifies the labels in the runs-on configuration and the scheduler will only place the job on a runner that has all of those labels. This reliably routes workloads to the right machines when you manage many runners with different capabilities.
Improve runner security by enforcing access controls with labels is not correct. Labels are selection metadata rather than an access control mechanism. Access is governed by runner groups and by where the runner is registered and by repository or organization policies.
Give workflow jobs descriptive names for easier monitoring is not correct. Job naming is handled by the name field in the workflow while labels are used to target runners based on capabilities.
Cloud Build is not part of GitHub Actions. It is a different service so it does not describe how custom labels are used for runner selection.
When a scenario mentions routing jobs to machines with specific hardware or tools, look for custom labels and the runs-on key that matches all listed labels to target the right self hosted runners.
At Riverbend Labs you are releasing a reusable GitHub Action that many teams will consume across multiple repositories and you want a predictable approach to communicate change impact while allowing users to pin compatible releases. What practice should you adopt for versioning the action?
-
✓ B. Use semantic versioning for action tags with the MAJOR.MINOR.PATCH scheme to signal compatibility
The correct option is Use semantic versioning for action tags with the MAJOR.MINOR.PATCH scheme to signal compatibility.
Semantic versioning gives consumers a clear and predictable signal about compatibility. The major number communicates breaking changes while minor and patch numbers indicate backward compatible additions and fixes. For a reusable GitHub Action you can publish full tags such as v1.2.3 and also maintain a moving major tag such as v1 that points to the latest compatible minor or patch so teams can pin safely and upgrade with confidence. This approach scales across many repositories and makes change impact easy to understand.
Use timestamp based release names like 2025.10.04.1530 for each publication does not convey compatibility or breaking changes and it forces users to interpret dates rather than version meaning. It also prevents the use of stable major tags that enable safe automatic updates.
Artifact Registry is unrelated to versioning GitHub Actions and it is a separate artifact storage service rather than a versioning practice that communicates compatibility for action releases.
Reference only immutable Git commit SHAs instead of creating version tags improves supply chain security for consumers but it does not communicate compatibility and it reduces discoverability for users. The better practice is to publish and update semantic versioning tags for releases while consumers may pin to a commit SHA within a major line when they need maximum immutability.
Look for keywords that hint at compatibility, breaking changes, and pinning. These usually point to semantic versioning with major, minor, and patch numbers and the use of stable major tags like v1 alongside full tags like v1.2.3.
Stonebridge Systems uses GitHub Actions to deploy to multiple environments and needs to include a service account key that is about 60 KB, which exceeds the repository secret size limit. What is the most appropriate way to handle this oversized secret within their workflows?
-
✓ C. Encrypt the secret with GPG, commit the encrypted file to the repository, and keep the decryption passphrase as a GitHub secret
The correct option is Encrypt the secret with GPG, commit the encrypted file to the repository, and keep the decryption passphrase as a GitHub secret.
This method avoids the repository secret size limit because the large value is stored as ciphertext in the repository while only a small passphrase is kept in GitHub Secrets. During the workflow run you decrypt the file using the passphrase, so the plaintext exists only at runtime and is never stored as a large secret. This keeps the sensitive material encrypted at rest, allows you to review changes to the encrypted blob without exposing its contents, and lets you rotate the passphrase by updating the secret and re-encrypting as needed.
Store the credential in Google Secret Manager and retrieve it during the workflow run is not the most appropriate choice for this scenario because it adds an external dependency and still requires provisioning secure access from GitHub to the cloud. You would need additional setup such as credentials or federation, which does not directly solve the problem of handling a single oversized value within the workflow repository context.
Place the entire 60 KB value directly into a repository secret to bypass the limit will not work because it exceeds the documented size limit for a single secret and GitHub will reject it.
Split the large value across several repository secrets and concatenate the parts in the workflow is brittle and hard to manage. It increases the risk of exposure, complicates rotation, and goes against recommended practices for handling large sensitive files.
When a secret is too large for a single store, think file encryption. Keep the encrypted blob in the repo and store only the small key or passphrase as a secret, and make sure to limit exposure by decrypting only at runtime and avoiding plaintext in logs.
An engineering team at Riverbend Analytics manages workflows in a GitHub repository and needs to enable step debug logging during troubleshooting. How should they configure ACTIONS_STEP_DEBUG so that the logs are generated, and which value is used if both a secret and a variable are defined?
-
✓ B. Set ACTIONS_STEP_DEBUG as either a repository secret or a repository variable and the secret value takes precedence if both are set
The correct option is Set ACTIONS_STEP_DEBUG as either a repository secret or a repository variable and the secret value takes precedence if both are set. This configuration enables step debug logs when the value is true and GitHub uses the secret value if both a secret and a variable exist.
To generate step debug logs you define ACTIONS_STEP_DEBUG with the value true. You can create it as a repository secret for stronger protection or as a repository variable for convenience. When both are defined with the same name GitHub resolves the value from the secret first. If only a variable exists then the variable value is used.
Set ACTIONS_STEP_DEBUG as either a repository secret or a repository variable and the variable value takes precedence if both are set is incorrect because it reverses the precedence. The secret value is used when both are present.
Cloud Logging is incorrect because it is not a GitHub Actions feature and it does not control step debug logs for GitHub workflows.
Set ACTIONS_STEP_DEBUG only as a repository variable is incorrect because GitHub supports using either a secret or a variable for this setting. Limiting it to only a variable is unnecessary and does not reflect the supported methods.
When options mention both secrets and variables, remember that secrets override variables when names match. Scan for wording about precedence and choose the option that states the secret is used.
Seaside Manufacturing must restrict access to internal APIs by using IP allowlists for jobs that run from GitHub Actions. About 80 percent of their pipelines use GitHub hosted runners and they require both Windows and macOS environments. How can they satisfy the allowlist requirement while keeping workflows dependable?
-
✓ C. Use GitHub hosted larger runners that publish static egress IP ranges and add those ranges to your firewall allowlist
The correct option is Use GitHub hosted larger runners that publish static egress IP ranges and add those ranges to your firewall allowlist.
This option provides published static egress IP ranges that you can reliably add to an allowlist, which keeps access to internal APIs controlled and predictable. It also preserves the convenience of GitHub hosted execution for the majority of pipelines and supports both Windows and macOS environments, which matches the stated requirement.
Add all Azure public IP address ranges to the allowlist because GitHub hosted Windows and Ubuntu runners run in Azure is incorrect because the Azure public IP space is vast and frequently changes, which makes allowlisting unreliable and overly permissive. It also does not account for macOS hosted infrastructure, and GitHub does not recommend allowlisting entire cloud provider ranges.
Implement self hosted runners in the data center with fixed IP addresses added to the allowlist is incorrect because it shifts most of the operational burden to you and moves away from GitHub hosted runners even though most pipelines use them. It would require you to provision and maintain both Windows and macOS capacity and it reduces dependability compared to a managed option that already offers static egress IPs.
Create separate workflows for internal access that run only on self hosted runners and remove IP allowlists is incorrect because removing allowlists violates the requirement to restrict access using IP allowlists. It also fragments workflows and introduces additional operational complexity without meeting the stated control objective.
When a scenario requires IP allowlists with GitHub hosted execution, look for options that provide static egress IPs and confirm OS coverage needed by the workflows. Be wary of answers that broadly allowlist a cloud provider or that tell you to remove the required control.
An engineer at scrumtuous.com is configuring a GitHub Actions workflow to build a container image and push it to GitHub Container Registry. Which registry domain should be used in the image name so that the push goes to GitHub Container Registry?
-
✓ B. ghcr.io
The correct option is ghcr.io.
GitHub Container Registry uses the host named ghcr.io for pushing and pulling container images. When you tag an image with this domain and authenticate to that registry your workflow will push to GitHub Container Registry rather than another service.
github.com is the website and Git hosting service and it is not a container registry endpoint, so tagging an image with this domain will not push to GitHub Container Registry.
docker.pkg.github.com refers to the legacy Docker registry for GitHub Packages that has been replaced by ghcr.io. It is deprecated which makes it less likely to appear as the right choice on newer exams.
docker.io is the Docker Hub registry domain which belongs to a different service and will not push images to GitHub Container Registry.
Identify the exact registry host required by the service in the question. For GitHub Container Registry the domain is ghcr.io. Be cautious when you see older endpoints that might be marked as legacy.
A team at BlueDot Robotics is setting up continuous integration with GitHub Actions for a repository named automationpipeline and they plan to include an in repository custom action alongside marketplace actions. Which components must exist so that the workflow can run when changes occur? (Choose 3)
-
✓ B. Trigger events that start the workflow
-
✓ C. A workflow definition written in YAML
-
✓ D. An action metadata file for a custom action
The correct options are Trigger events that start the workflow, A workflow definition written in YAML, and An action metadata file for a custom action.
You need Trigger events that start the workflow because GitHub Actions executes workflows in response to events such as push or pull request and without an event the workflow will never start.
You also need A workflow definition written in YAML because the YAML file in the .github/workflows directory defines the events, jobs, and steps that describe what to run and when to run it.
Since the team plans to include a custom action in the repository, they must provide An action metadata file for a custom action. This is the action.yml or action.yaml file that declares the action name, inputs, outputs, and the runtime so that the workflow can use the action.
The option Artifact Registry is not required for GitHub Actions to run. A registry can be used to store images or artifacts but it is optional and not a prerequisite for triggering or executing workflows.
Identify the minimal building blocks for GitHub Actions. Look for trigger definitions, a workflow YAML file in .github/workflows, and action metadata when a custom action is mentioned. Treat external services as optional unless the scenario explicitly requires them.
Your team at Orchard Metrics maintains a GitHub repository and you need a workflow to run whenever a new issue is created. Which on configuration will make the workflow execute when someone opens an issue?
-
✓ B. All of these configurations
The correct option is All of these configurations because each listed YAML configuration will cause the workflow to run when an issue is opened.
GitHub Actions exposes an issues event that fires when an issue is opened. You can listen to all issue events which will include opened or you can add a types filter set to opened so that only the opened action triggers. Both the single line array form and the multiline list form for the types filter are valid YAML and they behave the same for this event. Therefore the choice that states all of them is correct.
on: issues: types: [opened] would indeed run when an issue is opened, yet it is not the best selection here because more than one configuration satisfies the condition and the correct choice acknowledges that.
on: issues would also run when an issue is opened since it listens to all issue events, but it is not the best selection because multiple configurations meet the requirement and the correct choice reflects that.
on: issues: types: – opened would likewise run when an issue is opened because it is an equivalent YAML form of the types filter, but it is not the best selection since the correct choice confirms that all shown configurations work.
When different YAML snippets accomplish the same trigger, check if the most accurate answer is the one that says all of these rather than choosing a single snippet.
Your team at mcnz.com opens a new pull request in the payments app repository which triggers a GitHub Actions workflow. Where can the team view the status of that workflow run? (Choose 3)
-
✓ B. On the Checks tab of the pull request
-
✓ C. From the Actions tab of the repository
-
✓ D. On the pull request page before it is merged
The correct options are On the Checks tab of the pull request, From the Actions tab of the repository, and On the pull request page before it is merged.
The Checks tab of the pull request shows the runs triggered by that pull request and provides a clear pass or fail summary with logs and annotations. This is the most direct place to inspect the exact runs associated with the pull request.
The repository Actions tab lists all workflow runs across the repository and lets you filter by event, branch, or workflow so you can find the run for the pull request and compare it with other activity.
On the pull request page before it is merged you can see the status checks summary at the top of the conversation which gives a quick view of pending, successful, or failing checks without leaving the pull request.
On the Issues tab of the repository is incorrect because the Issues area is for tracking issues and discussions and it does not present the status of workflow runs.
When a question asks where to view a workflow status on a pull request, look for keywords like Checks, Actions, and status checks on the pull request since those are the primary places GitHub surfaces run results.
A small platform team at scrumtuous.com is getting ready to publish a custom GitHub Action. They want to know how the action’s metadata file will appear on the GitHub Marketplace listing. What does GitHub do with this metadata on the Marketplace page?
-
✓ C. GitHub uses the action metadata to automatically fill the Marketplace listing with its title description branding and input and output details
The correct option is GitHub uses the action metadata to automatically fill the Marketplace listing with its title description branding and input and output details.
GitHub reads the action metadata file in the repository and uses fields such as name and description to populate the listing title and summary. The branding section controls the icon and color that appear on the Marketplace card and page. Inputs and outputs defined in the metadata are rendered automatically on the listing and the repository README is shown for detailed usage and examples.
The option GitHub converts the action metadata into a dedicated standalone page outside the repository is incorrect because the listing is a Marketplace page that is tied to the repository and it is not converted into a separate site outside GitHub.
The option GitHub auto generates a comprehensive usage guide from the metadata and replaces the repository README on the listing is incorrect because the README remains the primary usage guide and the metadata only supplements the listing with structured details.
The option GitHub relies on the metadata only to organize actions into categories and language filters is incorrect because metadata is used to populate the visible listing content such as title description branding and inputs and outputs and it is not limited to categorization or filtering.
Focus on what the action.yml provides to the Marketplace listing. The title, description, branding, and inputs and outputs come from metadata while the README remains the detailed guide.
Blue Harbor Media runs deployments to Google Cloud from GitHub Actions and plans to let workflows obtain credentials using OpenID Connect with Workload Identity Federation instead of storing a service account key as a repository secret. What is the primary benefit of this approach?
-
✓ C. Improved security by not keeping long lived credentials in repository secrets
The correct option is Improved security by not keeping long lived credentials in repository secrets.
Using OpenID Connect with Workload Identity Federation lets GitHub Actions obtain short lived credentials from Google Cloud on demand rather than storing a persistent service account key in the repository. This sharply reduces the risk of credential leakage and removes the need for key distribution and rotation while still allowing fine grained access through IAM that is tied to the workflow identity.
Automatic deployment without any authentication is incorrect because authentication still occurs as the workflow must present an OIDC token and exchange it for a temporary Google credential before accessing Google Cloud.
Removal of the need to configure IAM roles and policies in Google Cloud is incorrect because you still must configure IAM on the Google Cloud service account and create the workload identity provider and binding to enforce least privilege.
Faster workflow execution because authentication is skipped is incorrect because authentication is not skipped and the token exchange exists to improve security rather than speed.
When a question mentions OpenID Connect and Workload Identity Federation prioritize answers that stress short lived credentials, no stored keys, and continued use of IAM roles over claims about skipping authentication or setup.
As the enterprise administrator at BluePeak Systems you need to tightly control GitHub Actions usage across all organizations while still permitting critical internal workflows to run. Which configuration should you implement to meet these requirements?
-
✓ C. Enforce a policy that allows only local actions and approved reusable workflows from within the enterprise
The correct choice is Enforce a policy that allows only local actions and approved reusable workflows from within the enterprise because it gives you strong control over what can run while still allowing the internal workflows your teams depend on.
This policy aligns with enterprise Actions governance where you restrict execution to actions that live in your enterprise and to reusable workflows that you have explicitly approved. By keeping execution sources local and curated, you reduce supply chain risk and prevent unvetted third party code from running. You can implement this through the enterprise Actions policy that allows only local actions and by using an allow list for reusable workflows that your security and platform teams have reviewed.
With this configuration you can maintain a tight boundary for code execution while ensuring that critical automation continues to function. It also centralizes control at the enterprise layer so that organizations and repositories inherit consistent protections.
Disable GitHub Actions for every organization in the enterprise is incorrect because it blocks all workflows and would prevent the critical internal automations that must continue to run.
Allow all Marketplace actions while restricting which organizations and repositories can create workflows is incorrect because even with authoring restrictions, any permitted workflow could still run unvetted actions from the Marketplace which does not provide tight control of execution sources.
Cloud Build is incorrect because it is a separate Google service and does not configure GitHub Actions usage or governance within your GitHub Enterprise environment.
When the scenario requires tight control yet continued operation of key workflows, look for answers that combine an allow list with local actions and approved reusable workflows. Avoid choices that either fully disable the platform or broadly allow external actions.
At BlueFjord Logistics on example.com you manage a GitHub Actions workflow with three jobs. The package job declares a needs relationship on the build job. If the build job fails during execution, what happens to the workflow and to the package job?
-
✓ C. The workflow is marked as failed and the job that depends on it does not run
The correct option is The workflow is marked as failed and the job that depends on it does not run.
When the build job fails, GitHub Actions concludes the workflow run as failed. Any job that declares a needs relationship on the failed job, such as the package job, is skipped because dependencies must finish successfully for a dependent job to start.
This behavior follows the needs dependency model where a job begins only when all required jobs have succeeded. Unless a failing job is explicitly configured with continue on error, a job failure contributes to a failed workflow conclusion, and dependent jobs will not run.
The dependent job is skipped while other unrelated jobs continue to run is incorrect because it omits the required outcome for the workflow. The workflow is marked as failed when a job fails and the question specifically asks about the workflow result and the dependent job.
Only the failed job is retried automatically without stopping the workflow is incorrect because GitHub Actions does not automatically retry failed jobs. Retries require a manual re run or custom logic, and a job failure still causes the workflow to be marked as failed unless configured otherwise.
Cloud Build takes over and executes the remaining steps is incorrect because Cloud Build is a separate Google Cloud service and it does not take over execution of GitHub Actions workflows.
When you see needs, translate it to dependency rules. A dependent job runs only if all required jobs succeed, and a failed prerequisite usually means the workflow concludes as failed and the dependent job is skipped unless continue-on-error is used.
All exam question come from my GitHub Action Udemy course and certificationexams.pro
The platform team at scrumtuous.com is standardizing continuous integration on GitHub Actions across many repositories and wants to build reusable custom actions that developers can share across projects. Which action types can they use to implement these custom actions? (Choose 3)
-
✓ A. Composite actions
-
✓ C. Docker container actions
-
✓ D. JavaScript actions
The correct options are Composite actions, Docker container actions, and JavaScript actions.
Composite actions let you combine multiple workflow steps into a single reusable unit defined in YAML. They are ideal for sharing common sequences of steps across many repositories because they can call other actions and run shell commands while avoiding the need for custom runtimes.
Docker container actions package code and all dependencies inside a container image and run in a consistent environment on any runner. They are well suited for tools or languages that need specific system dependencies or isolation.
JavaScript actions run directly on the runner using the Node.js runtime which makes them fast to start and easy to distribute. They are a good choice for lightweight logic and for interacting with the GitHub API without container overhead.
Cloud Build is not a GitHub Actions action type. It is a Google Cloud continuous integration service and although you can integrate external services from a workflow it does not implement a reusable GitHub Action.
Identify the first party action types that GitHub supports and confirm they map to how Actions run. Watch for services from a different platform because those are usually distractors even if they can be integrated.
Your engineering group at scrumtuous.com is setting up continuous integration with GitHub Actions to automate tests and deployments. During a design review someone asks what an action represents inside a GitHub workflow. How should you define an action in this context?
-
✓ B. It is a reusable single task that you combine in a GitHub Actions workflow and you can build your own or use community provided ones
The correct option is It is a reusable single task that you combine in a GitHub Actions workflow and you can build your own or use community provided ones.
In GitHub Actions an action is a discrete unit of work that runs as a step inside a job in a workflow. You can create your own or use community actions from the marketplace. Actions are reusable building blocks and they can be implemented as JavaScript actions, Docker container actions, or composite actions, which makes them easy to share and to compose in many workflows.
A workflow is the YAML file that orchestrates jobs and steps and those steps invoke actions. This separation explains why the correct option describes an action as a single task that you combine to build a larger automation.
It is a prebuilt workflow that GitHub publishes for common development tasks is incorrect. GitHub does provide starter workflows as templates, yet those are full workflows and not individual actions, and actions are the atomic tasks used within steps.
It is a Google Cloud Build trigger that starts when you push to a branch is incorrect because that describes Google Cloud Build rather than GitHub Actions.
It is an integrated plugin for Visual Studio Code that runs tests during editing is incorrect because a code editor plugin is not a GitHub Actions action and actions run in workflows on runners.
When options mention a single task that you can reuse, think action. When they describe YAML orchestration, triggers, or end to end automation, think workflow. Map the keywords to the GitHub Actions hierarchy of workflow, job, step, and action.
At BlueSky Analytics your GitHub Actions workflow builds and pushes a container image when code is merged into the “stable” branch and it authenticates using the GitHub token. The job sets an environment variable named REGISTRY to “ghcr.io” and the docker metadata step forms image names by joining REGISTRY with the repository path. Given this configuration which container registry will receive the pushed image?
-
✓ C. GitHub Container Registry
The correct option is GitHub Container Registry. The workflow sets REGISTRY to ghcr.io and the metadata step builds image names by prefixing that host, which directs the push to the GitHub owned registry.
Setting REGISTRY to ghcr.io targets GitHub Container Registry because ghcr.io is its hostname. Using the GitHub token for authentication works with this service for the repository owner by default, so the push from the workflow will go to GitHub Container Registry when the image name begins with ghcr.io.
Docker Hub is incorrect because that would require the image name to start with docker.io or no registry prefix with a configured default, and the workflow explicitly uses ghcr.io instead.
Google Artifact Registry is incorrect because its hostnames follow the *.pkg.dev pattern and it requires Google Cloud credentials, which do not match the ghcr.io configuration or the GitHub token authentication.
Amazon ECR is incorrect because it uses AWS account specific endpoints and needs AWS credentials, while the workflow targets ghcr.io and authenticates with the GitHub token.
Match the registry host in the image name to the provider. If you see ghcr.io it maps to GitHub Container Registry and if you see docker.io it maps to Docker Hub. Environment variables that set the registry host often reveal the destination.
At Brightline Studio on example.com you are editing a GitHub Actions workflow for a repository and you want it to start when either a push or a pull request happens. Which top level YAML key in the workflow file designates the events that start the run?
-
✓ C. on
The correct option is on.
In GitHub Actions the top level on key defines which workflow events trigger a run. You use it to list push and pull_request so the workflow begins when either event happens.
The name key only sets a human readable workflow name and it does not control when the workflow runs.
The runs-on key is used inside a job to choose the runner environment and it does not define the events that start a run.
The jobs key defines the jobs and their steps to execute and it does not determine which events start the workflow.
When a question asks what starts a workflow think about the events and look for the top level key that lists them. In GitHub Actions that key is often the answer.
A small DevOps team at example.com is building reusable JavaScript actions for its GitHub workflows and wants consistent behavior on GitHub-hosted runners. Which statements accurately describe how JavaScript actions execute and recommended development practices? (Choose 3)
-
✓ A. JavaScript actions created with Node.js work across Ubuntu, Windows, and macOS GitHub-hosted runners
-
✓ B. JavaScript actions run in the runner process and rely on tools that already come with the runner image
-
✓ D. Using the GitHub Actions Toolkit libraries can speed up authoring and testing of your action
The correct options are JavaScript actions created with Node.js work across Ubuntu, Windows, and macOS GitHub-hosted runners, JavaScript actions run in the runner process and rely on tools that already come with the runner image, and Using the GitHub Actions Toolkit libraries can speed up authoring and testing of your action.
JavaScript actions use the Node.js runtime that is available on GitHub-hosted runners, which lets the same action run on Ubuntu, Windows, and macOS. Cross platform behavior is achievable when you avoid operating system specific commands and file path assumptions and when you rely on the runtime and APIs provided by GitHub Actions.
These actions execute directly on the runner machine rather than inside a container, which means they can call the software and utilities that come preinstalled on the runner image. This reduces setup time and leads to predictable behavior that matches the tools and versions supplied by the image.
Using the GitHub Actions Toolkit libraries can speed up authoring and testing of your action because the official packages provide helpers for inputs and outputs, logging, error handling, executing commands, and calling the GitHub API. This reduces boilerplate and makes it easier to write reliable actions and to test them locally.
It is best practice to include compiled binaries alongside your JavaScript action so setup is easier and results are consistent is incorrect because JavaScript actions should be distributed as bundled JavaScript rather than platform specific binaries. The recommended practice is to compile your source and dependencies into a single distributable file and commit the generated distribution so the runner can execute it with the Node.js runtime that it already provides.
When a question compares action types, remember that JavaScript actions run directly on the runner and reuse preinstalled tools while container actions bring their own environment. Look for wording about cross platform support and official toolkit helpers to identify best practices.
Ravi is reviewing a failed GitHub Actions run in the Actions tab and he wants to open the YAML that defines the workflow used by that run directly from the run page. Which option in the failed run’s menu should he choose to view the workflow file quickly?
-
✓ C. View workflow file
The correct option is View workflow file because it lets Ravi open the workflow YAML that defined the run directly from the run page.
Choosing this option opens the workflow file in the repository at the commit used for that run so he can quickly inspect its triggers and steps and any changes that may have caused the failure.
The Download log archive option only packages and downloads the run logs for offline review and it does not open the workflow definition.
The Create status badge option helps generate a badge for README display and it does not show the workflow YAML.
The View raw logs option shows the text logs from the run and it does not display the workflow file.
Match the action you need with the exact UI wording. If you must open the YAML then choose the option that says workflow file and avoid options that mention logs or badges.
An engineering team at mcnz.com operates a self hosted GitHub Actions runner inside a restricted VPC where all outbound internet access must go through an HTTP proxy. Which environment variable should you set on the runner so it can successfully connect to GitHub?
-
✓ C. https_proxy
The correct option is https_proxy.
GitHub Actions runners establish outbound connections to GitHub over HTTPS and the runner reads the lowercase proxy environment variables for its network configuration. Setting this variable directs all HTTPS requests through your HTTP proxy so registration and job dispatch can succeed in a restricted VPC.
NO_PROXY defines hosts that should bypass a proxy and it does not tell the runner which proxy to use, so it will not enable connectivity by itself.
HTTP_PROXY applies to plain HTTP traffic and the runner connects to GitHub using HTTPS. The runner also expects the lowercase names for proxy variables, so this one is not used.
network_proxy is not a standard proxy environment variable recognized by the runner or common networking libraries, so it will be ignored.
Match the proxy variable to the traffic protocol and watch the case. If the connection is HTTPS then choose https_proxy and remember that many tools only honor the lowercase names.
NorthPeak Analytics hosts a repository on GitHub and uses GitHub Actions for delivery automation. They want a workflow to execute only when a release is published and it must not run for drafts, release creation, edits, or prereleases. Which trigger configuration should they add to the workflow file?
-
✓ C. on: release: types: [published]
The correct option is on: release: types: [published].
In GitHub Actions the release event supports activity types that let you filter on specific release actions. The published type fires only when a full release is published. Draft creation and editing are different actions and prerelease publication uses the prereleased action, so they do not match this trigger.
on: release: types: [created] triggers when a release is created which often corresponds to opening a draft. This would run for drafts and does not satisfy the requirement to avoid drafts and initial creation.
on: push: tags: [v*] listens to tag pushes rather than the release event. It can run for any matching tag and cannot distinguish between drafts, edits, or prereleases, so it is too broad for the scenario.
on: published is not a valid event key in GitHub Actions. The published activity must be specified under the release event to work.
When a scenario requires running only for a published release, look for the release event with a types filter. Remember that prereleased is a separate activity from published and that created can include drafts.
Northwind Apps created a reusable GitHub Action and wants it to appear on GitHub Marketplace so other teams can adopt it right away without manual review. Which prerequisites must be satisfied for the listing to go live immediately? (Choose 5)
-
✓ A. The name in the action metadata must be unique across GitHub Marketplace
-
✓ C. The action’s metadata file named action.yml is located at the root of the repository
-
✓ D. The repository that hosts the action is public
-
✓ E. The listing name cannot match any existing GitHub Marketplace category
-
✓ F. You have accepted the terms of service for publishing actions in GitHub Marketplace
The correct options are The name in the action metadata must be unique across GitHub Marketplace, The action’s metadata file named action.yml is located at the root of the repository, The repository that hosts the action is public, The listing name cannot match any existing GitHub Marketplace category, and You have accepted the terms of service for publishing actions in GitHub Marketplace.
GitHub uses the information in an action’s metadata to create its Marketplace listing and to prevent conflicts. This is why the name in the action metadata must be unique and why the listing name cannot match any existing GitHub Marketplace category. When naming requirements are satisfied the automated Marketplace checks can pass and the action can go live without manual review.
Automatic validation also confirms the repository structure and visibility. The action’s metadata file named action.yml is located at the root of the repository so GitHub can detect and parse it correctly, and The repository that hosts the action is public so the listing can be discovered and used by the community. These requirements enable immediate publication once all checks succeed.
Marketplace publication also requires agreement to the platform terms, so You have accepted the terms of service for publishing actions in GitHub Marketplace must be completed. After acceptance the listing can publish right away when the other conditions are met.
You must enable Cloud Build in your Google Cloud project before publishing is incorrect because it is unrelated to GitHub Actions and GitHub Marketplace and plays no role in listing an action.
When a question asks about listings that go live immediately, focus on requirements that GitHub can verify with automated validations such as metadata location, unique naming, repository visibility, and acceptance of terms. Treat any mention of third party cloud services as likely unrelated distractors.
Your team maintains a GitHub Actions workflow named “release-flow” that runs when a push event occurs. It contains a job named “prod-deploy” that uses the condition github.repository == ‘orion-tech/web-prod’. The job includes steps that check out the code, set up Node.js version 18, and install the bats package globally using npm. If this workflow is triggered by a push to the orion-tech/web-staging repository, what will be true about the prod-deploy job?
-
✓ C. The prod-deploy job will be marked as skipped
The correct option is The prod-deploy job will be marked as skipped.
The job uses an if condition that checks whether the github.repository context equals orion-tech/web-prod. A push from orion-tech/web-staging makes that expression evaluate to false. GitHub Actions evaluates job level conditions before any steps run. When the condition is false the job is skipped and no steps are executed.
This results in a Skipped status for the job in the workflow run summary. The checkout step, the Node.js 18 setup, and the npm installation of the bats package would not run because the job never starts.
Cloud Build will run the deployment instead is incorrect because this workflow runs on GitHub Actions and there is no automatic handoff to Google Cloud Build.
The prod-deploy job will execute all three configured steps is incorrect because a false job condition prevents the job from starting and therefore no steps run.
The prod-deploy job will fail with a configuration error is incorrect because the configuration is valid and the false condition results in a clean skip rather than a failure.
Identify whether a job level if condition evaluates to true for the triggering context. If it is false then the job will be skipped and none of its steps will run.
At Riverbend Robotics the team reviews GitHub Actions workflow logs to learn what the platform adds automatically. For every job they want to identify the two system generated steps that always appear even when not defined in the workflow file. Which steps does GitHub include for each job during a run?
-
✓ C. Set up job and Complete job
The correct option is Set up job and Complete job.
GitHub Actions automatically inserts two system steps in every job. It begins with Set up job which prepares the runner environment and workspace for the job to execute. It ends with Complete job which finalizes the run and allows any post steps from actions to execute before the job is marked complete.
Set up job and Tear down job is incorrect because the platform uses the specific wording Complete job for the final system step rather than Tear down job, and that is what you see in the logs for every job.
Authenticate to Google Cloud and Upload artifacts to Cloud Storage is incorrect because those are provider specific tasks that only run if you add the corresponding actions. They are not system steps that GitHub includes by default in every job.
Checkout and Post-job cleanup is incorrect because checkout only happens if you add the actions checkout step, and there is no universal step named Post-job cleanup. When actions define post behavior, the logs show action specific post steps rather than a generic cleanup step.
When a question asks for steps that appear in every job, think about system generated entries in the logs and not about actions you add yourself. Skim a sample log to anchor the exact wording before choosing.
A DevOps team at Nova Retail adopts GitHub Actions to speed up dependency installation using the cache action. During a workflow run the specified cache key is not found. What will the cache action do in this situation?
-
✓ C. The action saves a new cache at the end of the job if the run finishes successfully
The correct option is The action saves a new cache at the end of the job if the run finishes successfully.
This is how the cache action works when there is a miss in GitHub Actions. If no cache entry matches the key then the step proceeds without restored files. After the job completes successfully it saves a new cache at the end of the job if the run finishes successfully so future runs with the same key can restore it.
The action stops the workflow when the cache is missing is incorrect. A cache miss does not fail the step and the workflow continues normally.
The action searches other repositories to find a compatible cache is incorrect. Caches are scoped to the repository and runner environment and the action restores only from that scope or using restore keys within the same scope.
The action requires a maintainer to manually create or upload a cache before continuing is incorrect. The action manages cache creation automatically after a successful job and no manual upload is required.
When you read about a cache miss think continue now and create later. The job keeps running and a cache is written in the post step only if the job succeeds.
At Brightpath Labs you received a production credential used by the billing service, so you added it as a secret in the repository that hosts that service. Teams deploying from two other repositories report that their GitHub Actions workflows cannot read this secret during deployment. You want those repositories to use the same secret while keeping centralized control. What should you do?
-
✓ C. Create an organization Actions secret and allow only the required repositories to use it
The correct option is Create an organization Actions secret and allow only the required repositories to use it. This lets you reuse the production credential across multiple repositories while keeping centralized control and limiting access to only the teams that need it.
An organization Actions secret is defined at the organization level and can be granted to selected repositories. Workflows in those repositories can reference the secret just like a repository secret which enables a single source of truth for the credential and simplifies rotation and auditing.
Repository secrets are isolated per repository by design. Moving the credential to an organization Actions secret is the supported way to share it with only the necessary repositories while following least privilege.
Store the credential in Google Secret Manager and have each workflow fetch it at runtime is not the best choice here because it shifts secret management outside GitHub and introduces extra access configuration and bootstrap credentials. The question is solved cleanly with a native GitHub capability that provides controlled sharing.
Make the existing repository secret visible to everyone in the organization is not possible with GitHub repository secrets and it would violate least privilege by exposing a production credential to all repositories.
Encode the value with Base64 and store it in the repo so other teams can copy it is insecure because Base64 is not encryption and committing secrets to a repository exposes them to unauthorized access and history retention.
When multiple repositories must use the same secret in GitHub Actions, look for the highest scope that still supports selected repositories. Organization secrets provide centralized control and follow least privilege so prefer them over repo secrets or ad hoc workarounds.
A DevOps team at mcnz.com is building a GitHub Actions workflow to deploy a service to Google Cloud Run and they need the workflow steps to start quickly and remain simple across Ubuntu, macOS, and Windows runners. They are deciding whether to implement a JavaScript action or a Docker container action for a common task. Which benefit would a JavaScript action provide in this situation?
-
✓ C. JavaScript actions execute directly on the runner so they usually start faster and keep action code simple
The correct option is JavaScript actions execute directly on the runner so they usually start faster and keep action code simple.
This choice runs on the host runner without starting a container which reduces startup time and keeps setup minimal. It also works across Ubuntu, macOS, and Windows runners because it relies on the Node.js runtime that GitHub provides, so it fits the team’s need for quick execution and portability.
Docker container actions ensure a consistent environment across operating systems which can increase reliability is not the right benefit for this scenario because container actions add image pull and container startup overhead and they can only run on Linux runners, so they do not meet the cross platform requirement.
Cloud Build is unrelated to choosing between JavaScript and Docker actions in GitHub Actions and does not address the workflow step startup or cross platform simplicity the team needs.
Docker container actions provide stronger isolation and security boundaries than JavaScript actions does not match the primary requirement for faster startup and simple cross platform use, and container actions cannot run on macOS or Windows runners, which makes them a poor fit here.
Map the requirement to the action type. Choose a JavaScript action when you need start quickly and cross platform support. Choose a Docker action when you need a pinned environment and custom dependencies and remember it is Linux-only.
Your DevOps team at scrumtuous.com is refining a GitHub Actions workflow and wants to avoid a build step running forever. When you set the “timeout-minutes” field on that step, what exactly does this configuration control?
-
✓ B. It enforces a per command time limit within the step and fails the step if any single command exceeds it
The correct option is It enforces a per command time limit within the step and fails the step if any single command exceeds it. This means the configured timeout is applied to each command that runs inside the step and if any one command runs longer than the limit the step fails and the workflow proceeds according to its failure behavior.
This setting is useful when you want to prevent a single long running command from blocking the pipeline. It provides granular protection at the command level rather than only at the step or job level and it ensures the step fails quickly when an individual command exceeds the threshold.
It defines the upper limit for the entire job duration is incorrect because that describes a job level timeout which applies to the whole job and not to individual commands within a single step.
It sets how long the workflow waits for an external trigger such as a webhook or approval before continuing is incorrect because timeouts do not control waiting for external events or manual approvals and those are governed by different workflow mechanisms.
It caps the total runtime of the step as a whole and cancels it once that duration is reached is incorrect because this would end the entire step after the specified time whereas the setting in question focuses on each command within the step and fails the step if any single command exceeds the limit.
Read the exact scope of the setting and map it to the correct level such as job, step, or workflow. When options sound similar look for words that indicate granularity like per command versus whole step or entire job.
All exam question come from my GitHub Action Udemy course and certificationexams.pro
Priya oversees GitHub Actions settings for Asteria Robotics and wants a single variable to be shared across several workflows. She can define it at the organization level, the repository level, and the environment level. If the same variable name exists at all three levels, which value will the workflow use when it runs in that environment?
-
✓ B. The environment level variable overrides the others
The correct option is The environment level variable overrides the others.
This scope has the highest precedence in GitHub Actions variable resolution. When the same variable name is defined at all three scopes, the workflow uses the value from this scope and ignores the repository and organization values.
Organization level variable takes precedence is incorrect because organization scoped values are overridden by repository and by the environment scope when the same name exists.
Repository level variable takes precedence is incorrect because a repository scoped value is still overridden by the environment scope when the same name exists.
Values are merged with no single winner is incorrect because GitHub Actions uses precedence rather than merging conflicting variable values.
When variables or secrets exist at multiple scopes, remember that the environment scope has the highest precedence and overrides repository and organization values.
At mcnz.com your team needs one step in a GitHub Actions job to set a temporary environment variable and adjust PATH without changing any other steps in the job. How should you instruct the hosted runner during that step so the environment is customized only for that step?
-
✓ C. Emit workflow commands with the :: prefix from the step’s run script to change the runner environment for that step only
- The correct option is *Emit workflow commands with the
-
prefix from the step’s run script to change the runner environment for that step only*.
This approach instructs the runner while the step executes so the changes take effect only inside that step’s shell. Each step runs in its own process which means any variables you set or PATH adjustments you make within that step remain local to it and later steps are left unchanged. This satisfies the need to customize the environment for a single step without touching the rest of the job.
Be aware that some older commands using the same prefix were deprecated for security reasons. Current guidance favors environment files for cross step persistence which would not be appropriate when you want isolation, so keeping changes inside the step process is the safe choice for this scenario.
Set the environment key at the job level in the workflow file is incorrect because a job level environment applies to every step in the job and would modify other steps.
Cloud Build is incorrect because it is a different service and does not configure a GitHub Actions step on a hosted runner.
Insert an additional setup step that exports variables for the job is incorrect because adding another step changes the job when the requirement is to leave other steps untouched, and exports from one step do not persist to later steps unless you use environment files which would then affect other steps.
Map the asked scope to the offered mechanism. If only one step should change then keep adjustments inside that step and avoid job level or workflow wide settings.
Solstice Insights created a custom Docker container action for a GitHub Actions workflow that deploys resources to Google Cloud. A run failed because the workflow may not have passed expected environment variables such as “GOOGLE_PROJECT” and you want to see what variables are present inside the container at runtime. What should you do?
-
✓ C. Run the env command from the container entrypoint to print all environment variables available at runtime
The correct option is Run the env command from the container entrypoint to print all environment variables available at runtime.
For a Docker container action the entrypoint runs inside the container which means printing the environment there shows the exact variables the action can use. This approach reveals values provided by the workflow environment and default GitHub variables and any secrets that were mapped. It is the most direct way to verify whether GOOGLE_PROJECT and related variables are actually available when the action runs.
Review the env section in the action.yml to verify the variables defined for the action is incorrect because the metadata only describes defaults or expected inputs and it does not guarantee what the workflow passed at run time. Variables can be added or overridden in the workflow file or by the runner so you must check from inside the container.
Run docker inspect on the job container to view the environment configuration reported by Docker is incorrect because in GitHub Actions you do not manage the container directly and inspecting it from the host is not practical during a run. Even if you could inspect it you still might miss variables that are set or transformed by the entrypoint or shell at run time. Verifying from inside the container is authoritative.
Use Secret Manager to list the secret values and map them to the container environment is incorrect because listing secret values is not appropriate and does not reflect what the workflow actually exported. GitHub Actions injects secrets only when referenced and you should never print or enumerate secret values to debug environment presence.
When debugging container actions think from inside the container. Add temporary commands in the entrypoint to print the environment rather than relying on static configuration files.
Orion Metrics has a team of 25 engineers who maintain CI pipelines with GitHub Actions and they are considering whether to define workflows in YAML or in JSON. Which statement accurately describes a syntactic behavior of YAML that differs from JSON for these workflow files?
-
✓ C. YAML uses indentation and line breaks to represent structure while JSON defines structure with delimiters
The correct option is YAML uses indentation and line breaks to represent structure while JSON defines structure with delimiters.
This statement is accurate because YAML relies on significant whitespace. Indentation and new lines convey nesting and list structure, so the layout of the file directly represents the data. JSON represents structure with explicit delimiters. It uses braces and brackets to define objects and arrays and it separates elements with commas and uses colons between keys and values.
YAML requires every scalar string to be enclosed in quotation marks is incorrect because YAML allows unquoted scalars in many cases. Quotes are only needed when the content would otherwise be ambiguous, such as when it contains special characters or leading and trailing spaces.
YAML disallows comments in workflow definitions is incorrect because YAML supports comments that start with a hash and workflow files can include them for readability.
YAML permits literal tab characters for indentation is incorrect because the YAML specification forbids tabs for indentation and requires spaces, and many parsers will error when tabs are used.
When options compare formats, focus on what the specification enforces. YAML is whitespace significant while JSON is delimiter based. Be skeptical of absolute words like requires or disallows and verify rules about tabs and comments since these are common traps.
At BrightWave Media the delivery team plans to run CI jobs with GitHub-hosted runners while the security group at example.com requires an IP address allowlist for connectivity. Why could this requirement become burdensome for the operations staff?
-
✓ D. The allowlist must be updated often because GitHub-hosted runner IP ranges are large and change regularly
The correct option is The allowlist must be updated often because GitHub-hosted runner IP ranges are large and change regularly.
GitHub-hosted runners use ephemeral infrastructure and their egress comes from a broad set of addresses that GitHub publishes and updates on a frequent cadence. When a partner or internal service requires an IP allowlist the operations team must continuously track these changes and update the firewall or service configuration which creates ongoing maintenance and the risk of failed builds when updates lag.
Cross team approvals could slow provisioning and scaling of CI builds is not the primary issue in this scenario because the burden arises from dynamic egress address changes rather than approval workflows.
GitHub does not publish any IP ranges for GitHub Actions runners is incorrect because GitHub publishes the current ranges through the Meta API and related documentation and these ranges are intended to be consumed programmatically due to their frequent updates.
They would need to run Cloud NAT to obtain static egress IPs for the runners which adds extra maintenance is incorrect because Cloud NAT is for resources you run in Google Cloud while GitHub-hosted runners are managed by GitHub and are not in your network. Achieving static egress would require self-hosted runners or routing through a controlled egress proxy that you manage.
When a question mentions allowlists with GitHub-hosted runners look for clues about dynamic IP ranges and frequent updates. If the scenario requires fixed egress consider self-hosted runners or a managed egress proxy.
| Git, GitHub & GitHub Copilot Certification Made Easy |
|---|
| Want to get certified on the most popular AI, ML & DevOps technologies of the day? These five resources will help you get GitHub certified in a hurry.
Get certified in the latest AI, ML and DevOps technologies. Advance your career today. |

