mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #484] Event type auto-detection not working #333
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#333
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @edtan on GitHub (Jan 17, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/484
The event type auto-detection is not working as intended - it is always defaulting to
push, even though the workflow defines a different event type. For example, when runningactfor the following workflow, nothing happens. You must runact workflow_dispatchin order for it to run.It looks like this is happening due to #157:
PlanEvent("push")is nevernil, becausePlanEventalways creates and returns a newPlanobject:github.com/nektos/act@e6fcfed458/pkg/model/planner.go (L108-L122).@catthehacker commented on GitHub (Jan 17, 2021):
@edtan There is no auto-detection of event. It always defaults to push as it supposed to. You can see that in https://github.com/nektos/act#commands
@edtan commented on GitHub (Jan 18, 2021):
Oh I see. Then I think this part of the code is no longer needed, but it could be a useful feature to have:
github.com/nektos/act@e6fcfed458/cmd/root.go (L152-L157)@catthehacker commented on GitHub (Jan 18, 2021):
I looked at the code now and see what you meant, it can be an opt-in option enabled by flag.