You can configure your workflows to run when specific activity on GitHub happens, at a scheduled time, or when an event outside of GitHub occurs.
Workflow triggers are events that cause a workflow to run. Some events have multiple activity types. For these events, you can specify which activity types will trigger a workflow run.
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
branch_protection_rule | - created - edited - deleted | Last commit on default branch | Default branch
|
Runs your workflow when branch protection rules in the workflow repository are changed. For more information about branch protection rules, see "About protected branches." For information about the branch protection rule APIs
For example, you can run a workflow when a branch protection rule has been created or deleted:
on:
branch_protection_rule:
types: [created, deleted]
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
check_run | - created - rerequested - completed - requested_action | Last commit on default branch | Default branch
|
Runs your workflow when activity related to a check run occurs. A check run is an individual test that is part of a check suite.
For example, you can run a workflow when a check run has been rerequested or completed.
on:
check_run:
types: [rerequested, completed]
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
check_suite | - completed | Last commit on default branch | Default branch |
Runs your workflow when check suite activity occurs. A check suite is a collection of the check runs created for a specific commit. Check suites summarize the status and conclusion of the check runs that are in the suite.
For example, you can run a workflow when a check suite has been completed.
on:
check_suite:
types: [completed]
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
create | Not applicable | Last commit on the created branch or tag | Branch or tag created |
Note: An event will not be created when you create more than three tags at once.
Runs your workflow when someone creates a Git reference (Git branch or tag) in the workflow's repository.
For example, you can run a workflow when the create event occurs.
on:
create
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
delete | Not applicable | Last commit on default branch | Default branch |
Note: This event will only trigger a workflow run if the workflow file is on the default branch.
Note: An event will not be created when you delete more than three tags at once.
Runs your workflow when someone deletes a Git reference (Git branch or tag) in the workflow's repository.
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
deployment | Not applicable | Commit to be deployed | Branch or tag to be deployed (empty if created with a commit SHA) |
Runs your workflow when someone creates a deployment in the workflow's repository. Deployments created with a commit SHA may not have a Git ref. For information about the APIs to create a deployment.
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
deployment_status | Not applicable | Commit to be deployed | Branch or tag to be deployed (empty if commit) |
Note: When a deployment status's state is set to inactive, a workflow run will not be triggered.
Runs your workflow when a third party provides a deployment status. Deployments created with a commit SHA may not have a Git ref.
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
discussion | - created - edited - deleted - transferred - pinned - unpinned - labeled - unlabeled - locked - unlocked - category_changed - answered - unanswered | Last commit on default branch | Default branch |
Runs your workflow when a discussion in the workflow's repository is created or modified. For activity related to comments on a discussion.
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
discussion_comment | - created - edited - deleted | Last commit on default branch | Default branch |
Runs your workflow when a comment on a discussion in the workflow's repository is created or modified.
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
fork | Not applicable | Last commit on default branch | Default branch |
Note: This event will only trigger a workflow run if the workflow file is on the default branch.
Runs your workflow when someone forks a repository.
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
gollum | Not applicable | Last commit on default branch | Default branch |
Note: This event will only trigger a workflow run if the workflow file is on the default branch.
Runs your workflow when someone creates or updates a Wiki page.
Webhook event payload | Activity types | GITHUB_SHA | GITHUB_REF |
---|
issue_comment | - created - edited - deleted | Last commit on default branch | Default branch |
Note: More than one activity type triggers this event. For information about each activity type, see "Webhook events and payloads." By default, all activity types trigger workflows that run on this event. You can limit your workflow runs to specific activity types using the types keyword. For more information, see "Workflow syntax for GitHub Actions."
Note: This event will only trigger a workflow run if the workflow file is on the default branch.
Runs your workflow when an issue or pull request comment is created, edited, or deleted. For information about the issue comment APIs