It might be that job-level “env” context is populated after job-level “if” is tested. It’s a long shot, but i’d try if setting EVENT_LABEL at workflow-level “env” would help.
If not, you still can get (kinda) wanted behavior by moving check step-level:
- run: do-foo-thing
if: github.event.label.name == env.LABEL_FOO
- run: do-bar-thing
if: github.event.label.name == env.LABEL_BAR
- run: post-on-stackoverflow
if: github.event.label.name == env.LABEL_HELP
- run: send-flowers --color random
if: github.event.label.name == env.LABEL_BOOM
Most likely not a solution for everyone; it starts workflow, after all, which might be unwanted for few reasons. Packing N different, complex tasks into single job can be meh too. But if various simple tasks share some step(s), it might be nice.