AZ-400 ยท Pipeline foundations
Pipeline trigger rules
CI, PR, scheduled and pipeline-resource triggers in Azure Pipelines; on: push, pull_request, schedule, workflow_dispatch, workflow_run in GitHub Actions; branch, tag and path filters; batching and skipping CI.
Key points
- Azure Pipelines trigger (CI on push): branches, tags, paths include/exclude; batch: true = one run for queued changes; trigger: none disables CI.
- [skip ci] in a commit message skips CI.
- GitHub pull_request defaults: opened, synchronize, reopened.
- schedule (cron, default branch only), workflow_dispatch (manual), workflow_run (after another workflow, any result unless conclusion is checked).
- Branches and paths must both match.
Source: https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/trigger?view=azure-pipelines
Practice questions
If a GitHub Actions workflow uses on: pull_request with no types listed, which activity types start it?
- opened, synchronize and reopened
- opened and closed only
- every activity type, including labeled
- synchronize only
Show answer
Answer: A. opened, synchronize and reopened
The defaults are opened, synchronize and reopened. Closed and labeled need to be listed explicitly.
Which GitHub Actions events can start a workflow without a push or a pull request?
- schedule
- workflow_dispatch
- workflow_run
- push
- pull_request
Show answer
Answer: A. schedule, B. workflow_dispatch, C. workflow_run
schedule (cron), workflow_dispatch (manual) and workflow_run (after another workflow) all start runs independently of code events. push and pull_request are the code events.
A GitHub Actions schedule trigger runs the workflow file from whichever branch you last pushed it to.
Show answer
Answer: False
False. Scheduled workflows run only from the latest commit on the default branch.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
