8

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?

nowox
  • 25,978
  • 39
  • 143
  • 293

2 Answers2

4

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

jidicula
  • 3,454
  • 1
  • 17
  • 38
0

If you want to test the whole workflow locally there is beautiful act project.

For testing an individual GitHub Action there is github-action-ts-run-api project.

Cardinal
  • 1,321
  • 1
  • 11
  • 5