Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Servers, nginx and Docker

The Run workflow button is missing for a GitHub Actions workflow

ErrorNo Run workflow button above the list of workflow runs

Short answer

The Run workflow button appears only when the workflow file has the workflow_dispatch trigger and sits on the default branch, and running it needs write access to the repository. Add the trigger, merge the file to the default branch, or ask for write access.

  • Applies to GitHub Actions, GitHub CLI
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Open the workflow file on the default branch (not your feature branch) and look at its on: block.

    grep -n -A6 "^on:" .github/workflows/*.yml
  2. 2Match what you see, then jump to its fix

    1. 1The workflow runs on push or pull_request but shows no button.The workflow has no workflow_dispatch triggerFix
    2. 2workflow_dispatch is in your branch's file, but not in the file on the default branch.The trigger exists only on a feature branchFix
    3. 3Others see the button, you do not.Your account has no write access to the repositoryFix

What does the error look like?

  • No Run workflow button above the list of workflow runs

Cause 1 of 3

The workflow has no workflow_dispatch trigger

1Check

The button is shown only if the workflow file uses the workflow_dispatch event.

grep -n "workflow_dispatch" .github/workflows/*.yml

2Fix

Add workflow_dispatch to the on: block, with optional inputs.

on:
  push:
    branches: [main]
  workflow_dispatch:
    inputs:
      logLevel:
        description: 'Log level'
        required: true
        default: 'warning'
        type: choice
        options:
          - info
          - warning
          - debug

3Verify

After the change is on the default branch, the Run workflow button appears.

gh workflow run build.yml -f logLevel=info

Confirmed by docs.github.com

Did this fix it?

Cause 2 of 3

The trigger exists only on a feature branch

1Check

The workflow must be in the default branch to trigger workflow_dispatch, and the event receives events only when the file is on the default branch.

git show origin/main:.github/workflows/build.yml | grep -n workflow_dispatch

2Fix

Merge the change into the default branch. After that you can pick any branch in the Branch dropdown, or pass one with --ref.

gh workflow run build.yml --ref my-feature-branch

3Verify

The button shows and the run starts on the chosen branch.

gh run list --workflow build.yml --limit 3

Confirmed by docs.github.com

Did this fix it?

Cause 3 of 3

Your account has no write access to the repository

1Check

Write access to the repository is required to run a workflow manually.

# ask a repository admin which role your account has

2Fix

Ask an owner for write access, or have them run the workflow.

# role change by a repository admin

3Verify

After the role changes, reload the Actions tab: the button shows.

gh workflow run build.yml

Confirmed by docs.github.com

Did this fix it?

How do I stop it coming back?

  • Add workflow_dispatch to utility and deploy workflows when you create them.
  • Merge workflow changes to the default branch before testing the button.
  • Keep a short list of who has write access to repositories with deploy workflows.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Related fixes

Servers

docker pull or push to ghcr.io fails with 'denied'

Error response from daemon: denied

ghcr.io refuses a pull or push when Docker is not logged in, when the token lacks the package scope, or when the workflow's GITHUB_TOKEN has no packages permission or no access to that package.

4 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.