[GH-ISSUE #156] Auto-detected event might be confusing #100

Closed
opened 2026-03-01 21:40:07 +03:00 by kerem · 0 comments
Owner

Originally created by @aidansteele on GitHub (Mar 15, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/156

This is the current logic for determining which event name to run:

github.com/nektos/act@f5e67f2b86/cmd/root.go (L112-L120)

This confused me at first as I installed act, then ran act in my terminal and it ran an unexpected workflow - I have a few different ones. I expected it to run the workflow(s) I have defined for the push event as per these docs:

github.com/nektos/act@f5e67f2b86/README.md (L50-L51)

Maybe we could update the logic to instead:

  • Use args[0] if present; or
  • Use push event if any workflows are defined for it; or
  • Use first available event name discovered

What do you think? Happy to submit a PR if you're fine with this. I went ahead and submitted #157 if you're fine with this.

Originally created by @aidansteele on GitHub (Mar 15, 2020). Original GitHub issue: https://github.com/nektos/act/issues/156 This is the current logic for determining which event name to run: https://github.com/nektos/act/blob/f5e67f2b86e2f9f6290f8e1d506455885673576a/cmd/root.go#L112-L120 This confused me at first as I installed `act`, then ran `act` in my terminal and it ran an unexpected workflow - I have a few different ones. I expected it to run the workflow(s) I have defined for the `push` event as per these docs: https://github.com/nektos/act/blob/f5e67f2b86e2f9f6290f8e1d506455885673576a/README.md#L50-L51 Maybe we could update the logic to instead: * Use `args[0]` if present; or * Use `push` event if any workflows are defined for it; or * Use first available event name discovered What do you think? ~Happy to submit a PR if you're fine with this.~ I went ahead and submitted #157 if you're fine with this.
kerem closed this issue 2026-03-01 21:40:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#100
No description provided.