Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Github Actioon: List of Events that trigger workflows

GitHub Actions Events Table

EventDescriptionCommon Use Cases
pushTriggered when commits are pushed to a repository branch.Run CI builds, deploy code, run tests, or linting after code is pushed to a branch.
pull_requestTriggered when a pull request is opened, synchronized, or closed.Run tests, build previews, and lint code when a pull request is created or updated.
pull_request_reviewTriggered when someone submits a review to a pull request.Notify team members or run workflows based on PR reviews.
pull_request_review_commentTriggered when a comment is added to a pull request review.Automate responses or actions based on review comments on pull requests.
workflow_dispatchAllows manually triggering a workflow via the GitHub Actions interface.Trigger workflows manually, often used for custom workflows like deployments or tests.
scheduleTriggered based on a cron schedule (e.g., daily, weekly).Run periodic tasks like nightly builds, backups, or maintenance tasks.
releaseTriggered when a release is published, edited, or deleted.Automatically deploy, notify teams, or create release notes when a new release is created.
issue_commentTriggered when a comment is added to an issue or pull request.Respond to comments, automate issue management, or trigger builds/tests based on comments.
issuesTriggered when an issue is opened, edited, labeled, or closed.Automate issue triaging, labeling, or closing stale issues.
createTriggered when a branch or tag is created.Notify teams, or trigger CI/CD workflows when new branches/tags are created.
deleteTriggered when a branch or tag is deleted.Clean up resources or notify teams when a branch or tag is removed.
forkTriggered when a repository is forked.Send a notification or log repository forks for tracking.
starTriggered when a repository is starred or unstarred.Send a thank-you message or track the repository’s popularity.
watchTriggered when someone starts watching the repository.Notify maintainers or track the repository’s watchers.
publicTriggered when a repository is made public.Notify teams or trigger security workflows when a repository’s visibility changes.
workflow_runTriggered by the completion of another workflow.Chain workflows together, such as triggering deployments after a successful test run.
workflow_callTriggered when a reusable workflow is called from another workflow.Allows reusability of workflows across repositories.
statusTriggered when the status of a GitHub check run changes (e.g., success, failure).Notify teams or execute follow-up actions based on the status of previous checks.
check_runTriggered when a check run (e.g., CI test) is created, completed, or updated.Trigger workflows based on the results of automated checks.
check_suiteTriggered when a check suite (collection of check runs) is requested or completed.Perform actions based on the aggregate results of check suites.
repository_dispatchTriggered when an external service or another workflow sends a repository_dispatch event.Trigger workflows from external systems or via API requests.
deploymentTriggered when a deployment is created.Automate deployment processes like deploying applications or setting up infrastructure.
deployment_statusTriggered when a deployment status is updated (e.g., success, failure).Perform actions like rollback or notification based on the outcome of a deployment.
pull_request_targetTriggered for pull requests targeting the repository, but runs in the context of the base branch.Useful for workflows involving forked repositories, maintaining security while allowing PR contributions.
branch_protection_ruleTriggered when a branch protection rule is added, edited, or deleted.Monitor or enforce branch protection changes.
discussionTriggered when a discussion is created, edited, or deleted.Automate discussion management, notify teams, or categorize discussions.
discussion_commentTriggered when a comment is added to a discussion.Automate responses or notifications based on discussion comments.
repository_vulnerability_alertTriggered when GitHub detects a security vulnerability in the repository.Automate security workflows, patch dependencies, or notify security teams.
packageTriggered when a package is published or updated.Automate tasks like deployment or testing when a new package is released.
push_tagTriggered when a tag is pushed to the repository.Use for versioning, release automation, or CI based on tagging.
milestoneTriggered when a milestone is created, edited, or closed.Automate milestone tracking or notify teams of milestone progress.
labelTriggered when a label is created, edited, or deleted.Automate label management for issues and pull requests.
registry_packageTriggered when a registry package is published, updated, or deleted.Manage or monitor changes in packages stored in GitHub’s registry.
page_buildTriggered when a GitHub Pages site build completes.Automate tasks like notifying teams or triggering follow-up actions after a site is built.
memberTriggered when a user is added, removed, or invited to a repository.Automate onboarding or offboarding workflows for team members.
teamTriggered when a team is added, modified, or deleted.Automate team management workflows.
workflow_callTriggered when another workflow calls a reusable workflow.Useful for creating reusable workflows that can be invoked by multiple workflows.
secret_scanning_alertTriggered when GitHub identifies sensitive data in the repository.Automatically notify security teams or handle leaked secrets.

Explanation of Key Events

  1. push: This is one of the most commonly used events, triggering workflows when commits are pushed to a specific branch.
  2. pull_request: Triggered whenever a pull request is opened, updated, or merged. It’s useful for running CI/CD pipelines based on pull requests.
  3. workflow_dispatch: This allows manual triggering of workflows, useful for scenarios like manually starting a deployment.
  4. schedule: Allows workflows to run at specific times using cron syntax. Useful for nightly builds or periodic maintenance tasks.
  5. release: Used to trigger workflows when a new release is created. This is often used for deployment workflows.
  6. check_run / check_suite: These events are triggered when automated checks (like CI tests) complete or fail. Actions can be taken based on the results.
  7. deployment / deployment_status: Automate the deployment process when a new deployment is created or monitor the deployment status to handle rollback or notification.
  8. repository_dispatch: Trigger workflows from external services or systems using the GitHub API.

Example

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x