Maven / GitHub Actions Interview Questions
What are workflow triggers (on:) and which event types does GitHub Actions support?
The on: key defines which GitHub events cause a workflow to run. You can listen to a single event, a list of events, or an event with filters. GitHub provides more than 35 distinct event types across three broad categories.
Repository events fire when something happens in your repo:
push— a commit or tag is pushedpull_request— a PR is opened, synchronised, closed, etc.pull_request_target— same as above but runs in the context of the base branch (useful for forks)release— a release is published, edited, or deletedissues,issue_comment,discussioncreate,delete— branch or tag creation/deletion
Scheduled triggers use cron syntax:
on:
schedule:
- cron: '0 6 * * 1' # Every Monday at 06:00 UTC
Manual and cross-workflow triggers:
workflow_dispatch— lets you run the workflow manually from the GitHub UI or API, with optional input parametersworkflow_call— makes the workflow callable from another workflow (reusable workflows)workflow_run— triggers when another named workflow completesrepository_dispatch— triggers via a custom HTTP POST to the GitHub API, useful for external systems
Most event types accept additional filters. For example, push accepts branches:, tags:, and paths: filters so you only trigger on relevant changes instead of every push to every branch.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
