Running build tasks on a PR "on-demand"

I am setting up an environment where feature branches must pass the status check suite (using branch protection) before being committed to master.  However I would prefer not to run the whole suite on every commit to the feature branch.  Is there a suggested method to allow branch owners to manually trigger the status check suite?  I was thinking I’d be able to do it by triggering a workflow when a user comments on a PR Conversation with a specific message format, but it doesn’t appear there is a hook for PR Conversation comments.

Thanks!

Peter

The issue_comment event type seems to be what you’re looking for.

on:
  issue_comment:
    types: [created]

jobs:
foo:
runs-on: ubuntu-latest

steps:
      - name: run-something
        if: github.event.issue.comment.body == "Github, OK to test"
        run: <do your stuff here>

Also see my answer in this thread. You seem to be looking for the same thing.

2 Likes

Thanks!  I also didn’t realize PR comments are “issue comments” :slight_smile:

Ultimately it would be great to see Actions support a UI for triggering parameterized builds on-demand.