This page was generated based on Github’s Documentation. See our welcome page for context and details.

Github Event workflow_dispatch #

Github Action Trigger #


Webhook event payloadActivity typesGITHUB_SHAGITHUB_REF
workflow_dispatchNot applicableLast commit on the GITHUB_REF branch or tagBranch or tag that received dispatch

Note: This event will only trigger a workflow run if the workflow file is on the default branch.

To enable a workflow to be triggered manually, you need to configure the workflow_dispatch event. You can manually trigger a workflow run using the GitHub API, GitHub CLI, or GitHub browser interface. For more information, see “Manually running a workflow.”

on: workflow_dispatch

Providing inputs #

You can configure custom-defined input properties, default input values, and required inputs for the event directly in your workflow. When you trigger the event, you can provide the ref and any inputs. When the workflow runs, you can access the input values in the inputs context. For more information, see “Contexts.”


  • The workflow will also receive the inputs in the github.event.inputs context. The information in the inputs context and github.event.inputs context is identical except that the inputs context preserves Boolean values as Booleans instead of converting them to strings. The choice type resolves to a string and is a single selectable option.
  • The maximum number of top-level properties for inputs is 10.
  • The maximum payload for inputs is 65,535 characters.

This example defines inputs called logLeveltags, and environment. You pass values for these inputs to the workflow when you run it. This workflow then prints the values to the log, using the inputs.logLevelinputs.tags, and inputs.environment context properties.

        description: 'Log level'
        required: true
        default: 'warning'
        type: choice
        - info
        - warning
        - debug
        description: 'Test scenario tags'
        required: false
        type: boolean
        description: 'Environment to run tests against'
        type: environment
        required: true

    runs-on: ubuntu-latest
      - run: |
          echo "Log level: $LEVEL"
          echo "Tags: $TAGS"
          echo "Environment: $ENVIRONMENT"          
          LEVEL: ${{ inputs.logLevel }}
          TAGS: ${{ inputs.tags }}
          ENVIRONMENT: ${{ inputs.environment }}

If you run this workflow from a browser you must enter values for the required inputs manually before the workflow will run.

Screenshot of a list of workflow runs. A dropdown menu, labeled “Run workflow” and expanded to show input fields, is outlined in dark orange.

You can also pass inputs when you run a workflow from a script, or by using GitHub CLI. For example:

gh workflow run run-tests.yml -f logLevel=warning -f tags=false -f environment=staging

For more information, see the GitHub CLI information in “Manually running a workflow.”

Event Payload #


This event occurs when a GitHub Actions workflow is manually triggered. For more information, see "Manually running a workflow."

For activity relating to workflow runs, use the workflow_run event.

To subscribe to this event, a GitHub App must have at least read-level access for the "Contents" repository permission.


An enterprise on GitHub. Webhook payloads contain the enterprise property when the webhook is configured on an enterprise account or an organization that’s part of an enterprise account. For more information, see “About enterprise accounts."

github.event.inputsobject or nullrequired

The GitHub App installation. Webhook payloads contain the installation property when the event is configured for and sent to a GitHub App. For more information, see “Using webhooks with GitHub Apps."


A GitHub organization. Webhook payloads contain the organization property when the webhook is configured for an organization, or when the event occurs from activity in a repository owned by an organization.


The repository on GitHub where the event occurred. Webhook payloads contain the repository property when the event occurs from activity in a repository.


The GitHub user that triggered the event. This property is included in every webhook payload.