Use cancelled() function instead of always()#684
Conversation
It will not perform when canclled by users or timeout.
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Actions workflow so that certain cleanup and reporting steps are skipped when a workflow run is cancelled (by user action or timeout), while still running on failures.
Changes:
- Replace
always()with!cancelled()for the "Clean up unused hooks" step so it only runs when the job is not cancelled. - Replace
always() && steps.hooks.outputs.downloaded == 'true'with!cancelled() && steps.hooks.outputs.downloaded == 'true'for the "Remove downloaded hooks" step. - Replace
always()with!cancelled()for the "Run pre-commit-ci-lite" step to avoid running it on cancelled jobs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
WalkthroughA GitHub Actions workflow configuration file is modified to use Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
It will not perform when cancelled by users or when a timeout occurs.