200-901 Application Deployment and Security Practice Question
A CI/CD pipeline uses GitHub Actions. The workflow should trigger only when a pull request is opened against the 'main' branch. Which 'on' trigger configuration is correct?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
on: pull_request: branches: [main]
The correct syntax uses pull_request with branches filter.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
on: pull_request: branches: [main]
Why this is correct
This triggers when a pull request targets the main branch.
- ✗
on: [pull_request, push]
Why it's wrong here
This would trigger on both, but without branch filter it triggers on all branches.
- ✗
on: push: branches: [main]
Why it's wrong here
This triggers on push to main, not on pull requests.
- ✗
on: pull_request_target: branches: [main]
Why it's wrong here
pull_request_target runs in the context of the base repo, not typically used for simple triggers.
Go deeper
Related to this question
About these practice questions
Courseiva writes every 200-901 question from scratch — 989 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.