Skip to content

Handle remote prune failures gracefully on self-hosted runners - #4295

Merged
peter-evans merged 1 commit into
mainfrom
catch_failed_prune
Jan 21, 2026
Merged

Handle remote prune failures gracefully on self-hosted runners#4295
peter-evans merged 1 commit into
mainfrom
catch_failed_prune

Conversation

@peter-evans

Copy link
Copy Markdown
Owner

Towards #4198

Wrap the git remote prune command in a try-catch block to prevent the action from failing if the prune operation fails. Instead, log a warning message and allow the action to continue.

Fixes edge cases where the prune command may fail on self-hosted runners but shouldn't block the pull request creation workflow.

Wrap the git remote prune command in a try-catch block to prevent
the action from failing if the prune operation fails. Instead, log
a warning message and allow the action to continue.

Fixes edge cases where the prune command may fail on self-hosted
runners but shouldn't block the pull request creation workflow.
@github-actions

Copy link
Copy Markdown
Contributor

Full test suite slash command (repository admin only)

/test repository=peter-evans/create-pull-request ref=catch_failed_prune build=true
/test repository=peter-evans/create-pull-request ref=catch_failed_prune build=true sign-commits=true

@peter-evans