How to test GitHub CI without tons of push?

Viewed 489

When I create a new workflow with GitHub Actions I have this cumbersome workflow:

  1. Edit .github/workflows/ci.yml
  2. git commit --amend -mhope
  3. git push -f
  4. Goto my browser, hit F5, click on the workflow and pray
  5. Pull off some hairs from my old head and eventually goto 1

Is there any better alternative?

1 Answers

You can add a workflow_dispatch event to your on: directive. This allows you to trigger the workflow from the Actions panel in your repo. Once you've finished testing it, you can remove the trigger from your workflow YAML.

The trigger in the Actions panel looks like this (bottom right "Run workflow"):

enter image description here

Related