Workflow fails to parse when 'star' and 'workflow_dispatch' triggers are combined: Unexpected value 'star'
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
A workflow declaring both star and workflow_dispatch triggers fails to parse with:
failed to parse workflow: (Line: 3, Col: 3): Unexpected value 'star'
Each trigger alone parses fine. The combination fails regardless of order and regardless of whether types is specified.
Minimal repro
name: repro
on:
star:
types: [created]
workflow_dispatch:
jobs:
t:
runs-on: ubuntu-latest
steps:
- run: echo hi
Attempting to dispatch it:
$ gh workflow run repro.yml
HTTP 422: Invalid Argument - failed to parse workflow: (Line: 3, Col: 3): Unexpected value 'star'
Test matrix (all verified against github.com via the dispatch API):
| triggers | result |
|---|---|
star: with types: [created], alone |
parses |
workflow_dispatch:, alone |
parses |
star: + fork: |
parses |
push: + workflow_dispatch: |
parses |
star: + workflow_dispatch: |
fails |
workflow_dispatch: then star: (reversed) |
fails |
star: (no types) + workflow_dispatch: |
fails |
Expected behavior: both triggers are valid events individually, so the combination should parse like any other event combination.
Workaround: use watch: types: [started] instead of star (starring a repository fires the watch event with action: started). This parses and works correctly.
Environment: github.com; workflow first added to the default branch also shows a failed run (0s, no jobs, listed by file path) for the push that added it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal YAML workflow in the issue and reproduce the failure using gh workflow run repro.yml or the dispatch API. Trace workflow event parsing for the combined star and workflow_dispatch triggers, then verify that the combination parses and dispatches without the reported 422 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100