What the GitHub Actions exam covers
- Author and manage workflows253 questions
- Consume and troubleshoot workflows165 questions
- Author and maintain actions162 questions
- Manage GitHub Actions for the enterprise194 questions
- Secure and optimize automation145 questions
Free GitHub Actions practice test questions
A sample of 10 questions with answers and explanations. A free account includes a fixed set of 20 practice questions for this exam, retryable anytime. Paid access unlocks the full 919-question bank.
-
Which keyword defines what triggers a workflow (e.g., push, pull_request)?
- Aenv
- Bsteps
- Cjobs
- DonCorrect
✓ Correct answer: DThe top-level on key defines the events that trigger a workflow run, such as push, pull_request, schedule, or workflow_dispatch. You can list a single event, an array of events, or a map that further filters by branches, tags, or paths. GitHub Actions evaluates these event configurations against incoming activity to decide whether to start the workflow.
Why the other options are wrong- Aenv defines environment variables available to a workflow, job, or step; it supplies values to commands rather than controlling when the workflow runs.
- Bsteps is the list of tasks executed sequentially within a single job; it defines what work runs, not which event starts the workflow.
- Cjobs is the top-level key that groups one or more jobs that make up the workflow; it organizes the work but does not specify the triggering event.
-
A team uses a reusable deploy workflow and wants to ensure that only that specific workflow file (not arbitrary workflows in the same repo) can assume the production cloud role. Which OIDC claim should they constrain?
- Aworkflow
- Brepository
- Cjob_workflow_refCorrect
- Dref
✓ Correct answer: CFor jobs that use a reusable workflow, the job_workflow_ref claim holds the ref path to that reusable workflow, for example myorg/platform/.github/workflows/deploy.yml@refs/heads/main. Constraining this claim makes the cloud trust policy accept tokens only from jobs run by the designated deploy workflow, even when other workflows run in the same repository and branch.
Why the other options are wrong- Aworkflow holds the workflow's name, and workflow_ref points at the top-level caller workflow, so neither identifies the reusable workflow file that ran the job; job_workflow_ref does.
- Brepository narrows trust to the repository but not to a specific workflow file within it.
- Dref narrows trust to a branch or tag, not to a specific workflow file.
-
Select TWO statements that are TRUE about reusable workflows called via workflow_call.
- AA reusable workflow may only be called once per caller workflow run
- BA reusable workflow runs on the same runner type as the caller's operating system
- CThe GITHUB_TOKEN permissions granted to a reusable workflow are those of the caller workflowCorrect
- DA reusable workflow can have its own 'jobs' section with multiple jobsCorrect
✓ Correct answer: C, DA reusable workflow has its own jobs section, which can contain several jobs, each with its own runs-on and steps. Its GITHUB_TOKEN permissions come from the caller, and the called workflow can only downgrade, not elevate, them. A caller can call multiple workflows, referencing each in a separate job, and workflows can be nested up to ten levels. Runners are chosen by each job inside the reusable workflow, not inherited from the caller's operating system.
Why the other options are wrong- AA caller is not limited to one call: it can call multiple workflows, each in a separate job, and a matrix job can call the same reusable workflow once per combination.
- BEach job inside the reusable workflow specifies its own 'runs-on' value; it does not inherit the runner OS from the caller.
-
A team is choosing how to pin and target runners across several jobs for reliability and cost control. Select TWO accurate statements about GitHub-hosted vs. self-hosted runner selection and lifecycle. (Choose TWO)
- APinning a specific image like 'ubuntu-22.04' avoids surprise tool/OS changes that 'ubuntu-latest' introduces when GitHub advances the labelCorrect
- BEphemeral self-hosted runners run a single job then deregister, which avoids leftover state contaminating later jobsCorrect
- CGitHub-hosted runners persist their filesystem between jobs in the same workflow, so state carries over automatically
- DSelf-hosted runners are recommended for public-repo fork PRs because they are isolated by default
✓ Correct answer: A, BUsing a concrete image label such as 'ubuntu-22.04' insulates a workflow from changes that occur when GitHub repoints 'ubuntu-latest' to a newer OS/toolset, improving reproducibility. Ephemeral runners register, execute exactly one job, and then deregister, which is the recommended pattern (often via autoscalers like Actions Runner Controller) to guarantee a clean environment each run.
Why the other options are wrong- CEach GitHub-hosted job gets a fresh VM; filesystem state does not carry between jobs and must be passed via artifacts.
- DGitHub strongly WARNS against self-hosted runners for untrusted fork PRs because they are NOT isolated and can be compromised.
-
What is the description field in action.yml primarily used for?
- ASetting the commit status text on each run
- BThe body of the pull request comment it posts
- CNaming the artifact the action uploads
- DA short summary shown in the Marketplace listingCorrect
✓ Correct answer: DThe description key provides a concise human-readable summary of what the action does, shown on the Marketplace listing and in tooling. It does not affect runtime behavior.
Why the other options are wrong- ACommit statuses are set by API calls or specific actions, not by the description key.
- BThe action's code, not description, controls any comment it might post.
- CArtifact names are set when uploading, unrelated to the metadata description.
-
Which runs-on configuration targets any available runner in a runner group named 'gpu-pool'?
- Aruns-on: gpu-pool
- Bruns-on: group: gpu-pool
- Cruns-on: { group: gpu-pool }Correct
- Druns-on: labels: gpu-pool
✓ Correct answer: CTo route a job to a runner group you set runs-on to a mapping whose group key names the group, for example the block form group: gpu-pool or the equivalent inline mapping. A group can also be combined with a labels key to narrow further.
Why the other options are wrong- AA bare string is treated as a label, so this looks for a label named gpu-pool, not a group.
- BThis is not valid YAML; a mapping key needs proper nesting, not two colons on one line.
- Dlabels selects by label, not by group; a group requires the group key.
-
Which packages several workflow steps into one custom action that a step can then call with uses:?
- AA reusable workflow
- BA workflow template
- CA Docker container action
- DA composite actionCorrect
✓ Correct answer: DGitHub's custom actions overview says a composite action lets you combine multiple workflow steps within one action, for example bundling several run commands so a workflow executes them as a single step. Unlike a reusable workflow, it cannot contain jobs; it runs inside the caller's job on the caller's runner and is referenced with uses: like any other action.
Why the other options are wrong- AA reusable workflow is called by a job's uses: and brings whole jobs, so a step cannot call it.
- BA workflow template is starter YAML that is copied when someone creates a new workflow; it is not called at run time.
- CA Docker container action runs an image's entrypoint; it does not package a list of workflow steps.
-
You move repeated steps into a local composite action under .github/actions/setup. A job's first step is shown below, and it fails with 'Can not find action'. What is missing? ```yaml steps: - uses: ./.github/actions/setup ```
- AThe repository must be checked out with actions/checkout before a ./ action path can be resolvedCorrect
- BThe action folder needs a metadata file named setup.yml to match the folder name
- CLocal actions must be referenced by an absolute path under /home/runner/work
- DA composite action must be published to the Marketplace before a workflow can use it
✓ Correct answer: AThe workflow syntax reference says you must check out your repository before using a ./ action, because the path resolves against the runner's workspace. It now recommends the $/ prefix for actions in the same repository, which resolves to the running commit without a checkout. The metadata file must be named action.yml or action.yaml.
Why the other options are wrong- BThe metadata file must be named action.yml or action.yaml, whatever the folder is called.
- CLocal actions use a relative ./ path from the workspace (or the $/ prefix), not an absolute runner path.
- DLocal actions resolve from the repository; Marketplace publishing is only for sharing actions publicly.
-
A workflow is triggered by `on: push` with no branch, tag or path filters. Which of these pushes does NOT start a workflow run?
- AA push of three new commits to the main branch
- BA single push that creates five new tags at onceCorrect
- CA push of one new tag named v1.0.0
- DA force push to an existing feature branch
✓ Correct answer: BThe push trigger runs your workflow when you push a commit or tag, including force pushes, when no filters limit it. GitHub documents an exception: events will not be created for tags when more than three tags are pushed at once, so pushing five tags in one git push starts no run. Pushing the tags in smaller batches, or one at a time, creates the events.
Why the other options are wrong- AA push of several commits to a branch is a single push event and starts the workflow.
- CPushing a single tag creates a push event, and with no tag filters it starts the workflow.
- DA force push is still a push event and triggers on: push workflows.
-
Besides `runs`, which TWO top-level keys does the metadata syntax mark as required in action.yml? (Select TWO)
- Aauthor
- Bbranding
- CnameCorrect
- Dinputs
- EdescriptionCorrect
✓ Correct answer: C, EThe metadata syntax reference marks name (the name of the action, shown in the Actions tab) and description (a short description of the action) as required, along with runs. author, inputs, outputs, and branding are optional. For a Marketplace listing the name must also be unique, and branding sets the icon and color but is not required.
Why the other options are wrong- Aauthor is marked optional in the metadata syntax.
- Bbranding is optional; it customizes the badge but is not required.
- Dinputs is optional; an action may take no inputs.
Who this GitHub Actions practice exam is for
This practice set is for anyone preparing for the GitHub Actions exam - from first-time candidates building a foundation to experienced GitHub practitioners doing a final review before test day. If you learn best by working through realistic questions and reading why each answer is right or wrong, it is built for you.
How to use this GitHub Actions practice exam
- Start with the free sample questions above to gauge your current baseline.
- Read the full explanation on every question, including why each wrong option is wrong.
- Track your weak domains and focus your study where you are losing the most marks.
- Once you are scoring consistently well, take a timed, full-length mock exam.
- Use your readiness score to decide when you are ready to book the real GitHub Actions exam.
Related GitHub resources
- GitHub Actions study guideKey concepts
- GitHub practice examsAll GitHub
- Certification pathWhere this fits
- Certification exam guides & tipsBlog
- Plans & pricingFree & paid
- How these questions are written and reviewedMethodology
- Report a problem with a questionCorrections
- GitHub Advanced Security practice examRelated
- GitHub Copilot practice examRelated
- GitHub Enterprise Administrator practice examRelated
GitHub Actions practice exam FAQ
How many questions are in the GitHub Actions practice exam on CertGrid?
CertGrid has 919 practice questions for GitHub Actions, covering 5 exam domains. The real GitHub Actions exam is ~60 qs in 100 min. CertGrid's timed mock is a fixed 60 questions.
What is the passing score for GitHub Actions?
The GitHub Actions exam passing score is 70%, and you have about 100 min to complete it. CertGrid scores your practice attempts the same way so you know when you are ready.
Are these official GitHub Actions exam questions?
No. CertGrid is an independent practice platform. We do not provide real or leaked exam questions. Our questions are original and designed to help you practice the concepts, scenarios, and difficulty style of the GitHub Actions exam.
Is there a free GitHub Actions practice test?
Yes. You can take a free GitHub Actions practice test straight away: a fixed set of 20 practice questions for this exam, retryable as often as you like, with no credit card required. You get readiness scoring and a weak-domain breakdown on those questions. Paid plans unlock the full 919-question bank, timed mock exams and full-bank domain analytics.
What CertGrid is (and is not)
CertGrid is an independent IT certification practice platform for Azure, AWS, Google, Cisco, Security, Linux, Kubernetes, Terraform, and other certification tracks. It provides objective-mapped practice questions, readiness scoring, weak-domain drills, and explanations to help learners understand what to study next.
Independent & original. CertGrid is an independent practice platform and is not affiliated with or endorsed by GitHub. Questions are original practice items designed to mirror certification concepts and exam style. CertGrid does not provide official exam questions or braindumps.