features  ](/en/actions/security-guides/using-githubs-security-features-to-secure-your-use-of-github-actions)
    * [ Automatic token authentication  ](/en/actions/security-guides/automatic-token-authentication)

  * Creating actions 

    * [ About custom actions  ](/en/actions/creating-actions/about-custom-actions)
    * [ Create a Docker container action  ](/en/actions/creating-actions/creating-a-docker-container-action)
    * [ Create a JavaScript action  ](/en/actions/creating-actions/creating-a-javascript-action)
    * [ Create a composite action  ](/en/actions/creating-actions/creating-a-composite-action)
    * [ Metadata syntax  ](/en/actions/creating-actions/metadata-syntax-for-github-actions)
    * [ Dockerfile support  ](/en/actions/creating-actions/dockerfile-support-for-github-actions)
    * [ Set exit codes  ](/en/actions/creating-actions/setting-exit-codes-for-actions)
    * [ Publish in GitHub Marketplace  ](/en/actions/creating-actions/publishing-actions-in-github-marketplace)
    * [ Share from your private repository  ](/en/actions/creating-actions/sharing-actions-and-workflows-from-your-private-repository)
    * [ Share with your organization  ](/en/actions/creating-actions/sharing-actions-and-workflows-with-your-organization)
    * [ Release and maintain actions  ](/en/actions/creating-actions/releasing-and-maintaining-actions)
    * [ CLI setup action  ](/en/actions/creating-actions/developing-a-third-party-cli-action)

  * [ Guides for GitHub Actions  ](/en/actions/guides)

  * [ GitHub Actions ](/en/actions "GitHub Actions") / 
  * [ Using workflows ](/en/actions/using-workflows "Using workflows") / 
  * [ Trigger a workflow ](/en/actions/using-workflows/triggering-a-workflow "Trigger a workflow")

#  Triggering a workflow

How to automatically trigger GitHub Actions workflows

##  In this article

  * About workflow triggers 
  * Using events to trigger workflows 
  * Using event activity types 
  * Using filters 
  * Defining inputs for manually triggered workflows 
  * Defining inputs, outputs, and secrets for reusable workflows 
  * Using event information 
  * Further controlling how your workflow will run 
  * Available events 

##  About workflow triggers

Workflow triggers are events that cause a workflow to run. These events can
be:

  * Events that occur in your workflow's repository 
  * Events that occur outside of GitHub and trigger a ` repository_dispatch ` event on GitHub 
  * Scheduled times 
  * Manual 

For example, you can configure your workflow to run when a push is made to the
default branch of your repository, when a release is created, or when an issue
is opened.

Workflow triggers are defined with the ` on ` key. For more information, see "
[ Workflow syntax for GitHub Actions ](/en/actions/using-workflows/workflow-
syntax-for-github-actions#on) ."

The following steps occur to trigger a workflow run:

  1. An event occurs on your repository. The event has an associated commit SHA and Git ref. 

  2. GitHub searches the ` .github/workflows ` directory in your repository for workflow files that are present in the associated commit SHA or Git ref of the event. 

  3. A workflow run is triggered for any workflows that have ` on: ` values that match the triggering event. Some events also require the workflow file to be present on the default branch of the repository in order to run. 

Each workflow run will use the version of the workflow that is present in the
associated commit SHA or Git ref of the event. When a workflow runs, GitHub
sets the ` GITHUB_SHA ` (commit SHA) and ` GITHUB_REF ` (Git ref) environment
variables in the runner environment. For more information, see " [ Variables
](/en/actions/learn-github-actions/variables) ."

###  Triggering a workflow from a workflow

When you use the repository's ` GITHUB_TOKEN ` to perform tasks, events
triggered by the ` GITHUB_TOKEN ` , with the exception of ` workflow_dispatch
` and ` repository_dispatch ` , will not create a new wo