fix(unit): read the trigger from the event payload #91
No reviewers
Labels
No labels
needs-human
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
cjournois/reusable-pipeline!91
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/expanded-event-name"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On 7.0.0, project/telos#180 PR CI skipped the
Imagejob on every image unit, so a PR never builds its image. The cause is in Forgejo 17.0.1: inside a reusable workflow it expands into jobs, the runner setsgithub.event_nametoworkflow_call. The server checks job conditions with the real trigger (pull_request) and the runner checks them again withworkflow_call, so the job reaches the runner and is then marked skipped (services/actions/context.go:90-95, runneract/runner/run_context.go:1416-1430). The event payload, ref and sha still belong to the original run.gate.sh(the plan job) reads the trigger from the payload:pull_request,schedule,workflow_dispatchorpush. When there is no payload it falls back toGITHUB_EVENT_NAME. It outputsevent.PUSH, and the rolling base-image tag, useneeds.plan.outputs.eventinstead ofgithub.event_name.workflow_dispatch/push [publish]/pull_request [publish]rules depended on the same name, and were silently off in expanded callers. They work again.Verified:
just lint testpasses (492 bats; 5 new cases cover each payload shape, includingGITHUB_EVENT_NAME=workflow_call), actionlint clean. Not run on a live consumer yet: after release, telos#180 repins and its PR CI should showImagerunning for each image unit.Session: 3acdb5a2-9a36-4c5c-9d3c-2e7c6ac1b8e3