mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #442] I can't get if: ${{ always() }} / if: always() working (with master) #309
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#309
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 @oderwat on GitHub (Dec 9, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/442
For cleaning up the local test environment, we need a way to run commands when the Test job fails. I learned that this could be done using
if: always()in the cleanup steps. I didn't get this to work and thought it might not be supported but found issue #387, which describes my problem, which is closed. I saw that the linked commit, which is supposed to fix this, being in master and therefore build master for testing this. Still, it does not work.Any idea what I may do wrong?
Example (partial):
@github-actions[bot] commented on GitHub (Jan 16, 2021):
Issue is stale and will be closed in 14 days unless there is new activity
@oderwat commented on GitHub (Jan 16, 2021):
Nobody?
@edtan commented on GitHub (Jan 18, 2021):
From what I can tell,
actcurrently will stop running on the first error in a series of steps, so it never reaches the last step where you have defined thealways()expression. The implementation of running the steps in series is inNewPipelineExecutor():github.com/nektos/act@e6fcfed458/pkg/common/executor.go (L60-L66)I'm not exactly sure how to go about resolving this, but any pointers would be appreciated - I'd be happy to help PR a solution. I did notice that there was a
NewConditionalExecutor, but it is not currently being referenced anywhere aside from some tests, so perhaps that could be utilized?update: It looks like
continue-on-erroris currently defined but not used anywhere - I think we might be able to add a check toThen()to check thecontinue-on-errorflag.@oderwat commented on GitHub (Jan 18, 2021):
So when I understand it right, the feature actually does not exists or is not fully implemented. Sadly I am currently not able to invest time to help with a PR. I think the feature itself is needed to replicate the behavior on Github and hope that it can be added without too much of an investment.
@edtan commented on GitHub (Jan 18, 2021):
Yes, my understanding is that the feature is not implemented in
actyet. I can try to look into a PR for this when I have time again - hopefully next weekend.@github-actions[bot] commented on GitHub (Feb 19, 2021):
Issue is stale and will be closed in 14 days unless there is new activity
@felipecruz91 commented on GitHub (May 10, 2021):
I'm experiencing the same scenario. It would be great to have this functionality as part of act.
@chris3ware commented on GitHub (Sep 15, 2021):
Same here. This feature would be an excellent addition.