mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #2740] [Feature Request] Add option to only trigger Pre, Main or Post steps of job steps #1240
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#1240
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 @qoomon on GitHub (Apr 24, 2025).
Original GitHub issue: https://github.com/nektos/act/issues/2740
Act version
0.2.76
Feature description
I am currently working on an action to run steps in parallel https://github.com/qoomon/actions--parallel-steps
So far act is quite handy to achieve this with little effort. Everything is working except that the
PreandPoststeps of actions are executed as part of the main step of my parallel-steps action.Therefore it would be awesome to be able to specifically only runs
Pre,MainandPostaction steps.And it would be great to run a specific step of a job only, currently it's only possible to run a whole job. But this only an improvement idea, because I worked around that by use jobs with exactly one step :-)
@qoomon commented on GitHub (May 2, 2025):
Three environment variables to separately skip
pre,mainandpostwould be enough as a solution e.g.ACT_STEPS_PRE_SKIP=true,ACT_STEPS_MAIN_SKIP=true,ACT_STEPS_POS_SKIP=true@ChristopherHX commented on GitHub (May 2, 2025):
Act keeps state between pre, main, post step. Like GITHUB_STATE, workdir, container, volumes etc. AFAIK It's design does not allow someone managing state externally without rewriting old code.
This could cause inconsistencies, since the action state is unclear
The best you can do is
.
@qoomon commented on GitHub (May 3, 2025):
@ChristopherHX sounds promising, can you explain how to
start act in the pre step and let act run all pre stagesand how to listen for those stage signals?@ChristopherHX commented on GitHub (May 3, 2025):
An action can start a daemon process without waiting for it to finish, so the runner moves on.
in bash an AI assistent would provide you such an bash snipped, e.g. wait for a file to be created until bash exists.
$RUNNER_TEMP/$(uuidgen)in bashact --env MYSTATEDIR=$MYSTATEDIR$MYSTATEDIR/main.start@qoomon commented on GitHub (May 4, 2025):
ah now I got it, thats a nice idea thanks a lot