Search code examples
githubgithub-actions

Github actions - cancel/manually trigger workflow


I have a public repo, is it possible to enable canceling/manually triggering workflow for people who are not the repo owners?
I have added the below part to manually trigger the workflow.

on: workflow_dispatch

I am able to do the above operations, but people who are raising a PR or something to my repo cannot cancel or manually trigger it.
Is there any kind of permissions that need to be given to that person to do so?

Solution

  • They need Collaborator access for a repository owned by a user account. For an organization repository, they need at least the Write role.

    Manually running a workflow
    Write access to the repository is required to perform these steps.

    https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow

    Canceling a workflow
    Write access to the repository is required to perform these steps.

    https://docs.github.com/en/actions/managing-workflow-runs/canceling-a-workflow