Run post-job steps even when action has been cancelled #14920

Open
opened 2025-11-02 11:25:52 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @Naxdy on GitHub (Sep 1, 2025).

Feature Description

GitHub Actions runs its post-job steps even when the action has been cancelled (regardless of whether due to concurrency, or manual cancellation). However, Gitea Actions immediately aborts everything, including the post-job actions.

This can be undesirable in a lot of situations, when post-job actions are required for job cleanup, regardless of success state.

The feature request is to amend the behavior of Gitea Actions to also execute post-job steps even if the action has been cancelled.


As a real-world example, we have a build process that pushes successful build artifacts to a binary cache as a post action. This should happen regardless of whether or not the entire build succeeds, since even if the build fails, artifacts of intermittent successful steps will still be pushed, allowing subsequent runs to complete faster.

As of right now, if the build fails, the behavior is as expected, since post-job steps do run when a previous step has failed. However, if the build is cancelled (e.g. because we can reasonably foresee that the build will fail, or a new revision has been pushed), the post-job steps are not executed, and we miss out on uploading our artifacts to our binary cache.

Screenshots

No response

Originally created by @Naxdy on GitHub (Sep 1, 2025). ### Feature Description GitHub Actions runs its post-job steps even when the action has been cancelled (regardless of whether due to concurrency, or manual cancellation). However, Gitea Actions immediately aborts everything, including the post-job actions. This can be undesirable in a lot of situations, when post-job actions are required for job cleanup, regardless of success state. The feature request is to amend the behavior of Gitea Actions to also execute post-job steps even if the action has been cancelled. --- As a real-world example, we have a build process that pushes successful build artifacts to a binary cache as a post action. This should happen regardless of whether or not the entire build succeeds, since even if the build fails, artifacts of intermittent successful steps will still be pushed, allowing subsequent runs to complete faster. As of right now, if the build _fails_, the behavior is as expected, since post-job steps do run when a previous step has failed. However, if the build is cancelled (e.g. because we can reasonably foresee that the build will fail, or a new revision has been pushed), the post-job steps are not executed, and we miss out on uploading our artifacts to our binary cache. ### Screenshots _No response_
GiteaMirror added the topic/gitea-actionstype/proposal labels 2025-11-02 11:25:52 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14920