Events that trigger workflows - rashinarasheed/github-actions-cert-prep GitHub Wiki

Events trigger workflows. They serve as the signal for work to start happening if a GitHub Actions workflow is present and the triggering event matches the start conditions specified in the workflow.

Use the on key to specify what events trigger your workflow.

Here’s a workflow for that:

on:
  issues:
  
jobs:
  
  notify-for-issue:
    runs-on: ubuntu-latest
  
    steps:
      - run: echo "Something happened with an issue"

If you need to refine more when your workflow runs, there are options you can supply for the triggers in the on section. These are referred to as activity types.

Triggering Based on Activity Types

The activity types values allow you to specify what kinds of operations on the object will cause your workflow to run.