Wrap transient operations in a simple retry loop.
Section: Shell failures and common fixes
Retry a flaky network step in Bash
bash
bash
for i in 1 2 3; do
npm install && break
sleep 5
doneExplanation
Use sparingly for transient network issues while you investigate the real cause.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Shell failures and common fixes
Inspect the raw event payload
Dump the event JSON file path or contents for debugging.
Verify workspace contents
Check that expected files exist after checkout or artifact download.
Pin actions to a major or full version
Avoid unexpected behavior from drifting dependencies.