Microsoft Azure
GitHub Actions
GH-200
Master GitHub Actions with the GH-200 exam focused on automation.
150 questions
0 views
Free
Questions 51–60 of 150
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.