workflow-dispatch icon indicating copy to clipboard operation
workflow-dispatch copied to clipboard

Allow specifying workflow by path

Open FooBarWidget opened this issue 4 years ago • 3 comments

Previously, workflow-dispatch only allows specifying the workflow by ID (as returned by the API) or by name (as specified in the YAML). Specifying by ID is problematic because the ID is auto-generated by Github, so we don't know what the ID is before we push, and the ID can differ per repository fork. Specifying by name (in the YAML) is also problematic because the until you've pushed this workflow to the main branch, Github doesn't read its name, and thus workflow-dispatch fails to find a workflow with that name.

This pull request allows specifying a workflow by path. This always works even when introducing a workflow for the first time in a branch.

Closes #18.

FooBarWidget avatar Oct 03 '21 09:10 FooBarWidget

This is great, can you post a few examples of what the workflow path would look like?

CWSites avatar Feb 22 '22 20:02 CWSites

It's in the docs. Example: .github/workflows/ci.yml

FooBarWidget avatar Feb 22 '22 20:02 FooBarWidget

@benc-uk is there a reason we can get some of these PRs merged? :)

CWSites avatar Mar 02 '22 15:03 CWSites

Fixed in v1.2 and master

benc-uk avatar Oct 28 '22 14:10 benc-uk