Interview Prep/CI/CD/GitHub Actions

What events can trigger a workflow?

BeginnerConceptGitHub Actions
Answer

Common ones: push, pull_request, workflow_dispatch (manual, with inputs), schedule (cron, UTC), release, workflow_call (reusable workflow), workflow_run (after another workflow), repository_dispatch (API webhook), merge_group, and pull_request_target. You can filter by branches, tags and paths.

on:
  push:
    branches: [main]
    tags: ['v*']
  schedule:
    - cron: '0 3 * * 1'
  workflow_dispatch:
    inputs:
      env: { type: choice, options: [staging, prod], default: staging }
All CI/CD questions

More on GitHub Actions