Microsoft Azure

GitHub Actions

GH-200

Master GitHub Actions with the GH-200 exam focused on automation.

150 questions 0 views Free
Start Mock Test Timed · Full-length · Scored

Questions 51–60 of 150

Q51

You are configuring a GitHub Action that runs a script whenever a pull request is created. What happens if the `if:` condition evaluates to false?

  • A The action still runs.
  • B The action is skipped.
  • C The action fails.
  • D The action runs without error.
Explanation If the `if:` condition evaluates to false, the action is skipped and not executed, allowing for conditional workflows.
Q52

Which service is primarily used for continuous integration in Azure DevOps?

  • A Azure Pipelines
  • B Azure Repos
  • C Azure Test Plans
  • D Azure Artifacts
Explanation Azure Pipelines is designed for CI/CD processes; others provide repository management or testing.
Q53

A company needs to ensure YAML pipeline parameters are required when a pipeline runs. What must be configured?

  • A Set parameters as non-optional
  • B Define default values
  • C Utilize 'required' attribute
  • D Add a condition to stages
Explanation The 'required' attribute ensures parameters must be specified; others do not enforce user input.
Q54

What happens when a GitHub Actions workflow exceeds the specified timeout?

  • A Workflow completes successfully
  • B All jobs are canceled
  • C Only failed jobs are retried
  • D Logs are saved for later
Explanation Exceeding the timeout leads to cancellation of all running jobs; others incorrectly imply continued execution.
Q55

Which service allows you to define CI/CD workflows in GitHub?

  • A GitHub Actions
  • B Azure DevOps
  • C Azure Pipelines
  • D GitLab CI
Explanation GitHub Actions is specifically designed for GitHub CI/CD workflows, while the others are separate tools or platforms.
Q56

A company needs to trigger workflows based on repository events. Which feature should they use?

  • A Webhooks
  • B Triggers
  • C Actions
  • D Workflows
Explanation Triggers are the specific events that originate actions in GitHub Actions workflows based on repository events.
Q57

What happens when you set a workflow for 'on: schedule' without a proper cron expression?

  • A Workflow runs hourly
  • B Workflow fails immediately
  • C No scheduled runs occur
  • D Triggers on push events
Explanation 'on: schedule' without a valid cron expression means no scheduled runs will occur.
Q58

Which service is best for container orchestration in Azure?

  • A Azure Kubernetes Service
  • B Azure Functions
  • C Azure VM Scale Sets
  • D Azure App Service
Explanation Azure Kubernetes Service (AKS) is specifically designed for container orchestration, while the others serve different purposes.
Q59

A company needs to automate CI/CD workflows. Which GitHub Actions feature should they use?

  • A Scheduled workflows
  • B Artifacts
  • C Jobs and steps
  • D Webhooks
Explanation Jobs and steps in GitHub Actions define workflows, while the others are impact areas but not the core function.
Q60

What happens when a GitHub Action fails during execution?

  • A All subsequent actions are skipped
  • B The action retries automatically
  • C The workflow has no errors
  • D Failure is counted as success
Explanation If an action fails, subsequent actions will not run unless configured for error handling, while the others misrepresent typical behavior.