YAML config vocabulary

  • on: pull_request / push / workflow_dispatch — GitHub Actions trigger events; always read on: first
  • needs: [job1, job2] — job dependency; the current job runs only after all listed jobs succeed
  • depends_on: — docker-compose startup order (container starts, not service readiness)
  • env_file: .env — loads host-side file into container environment variables at startup
  • ${VAR:-default} — substitution with fallback; ${VAR} reads from host environment

Question 0 of 5

Read this GitHub Actions workflow snippet. Which event triggers this workflow to run?

name: CI on: pull_request: branches: [main, develop] workflow_dispatch: jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: npm test