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.
Describe the bug
A workflow declaring both
starandworkflow_dispatchtriggers fails to parse with:Each trigger alone parses fine. The combination fails regardless of order and regardless of whether
typesis specified.Minimal repro
Attempting to dispatch it:
Test matrix (all verified against github.com via the dispatch API):
star:withtypes: [created], aloneworkflow_dispatch:, alonestar:+fork:push:+workflow_dispatch:star:+workflow_dispatch:workflow_dispatch:thenstar:(reversed)star:(no types) +workflow_dispatch:Expected behavior: both triggers are valid events individually, so the combination should parse like any other event combination.
Workaround: use
watch: types: [started]instead ofstar(starring a repository fires thewatchevent withaction: 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.