-
Notifications
You must be signed in to change notification settings - Fork 15
Retry downloads in case of failure #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -50,7 +50,11 @@ runs: | |||||
| echo "Installing crane @ ${tag} for ${os} on ${arch}" | ||||||
| tmp=$(mktemp -d) | ||||||
| cd ${tmp} | ||||||
| curl -fsL https://github.com/google/go-containerregistry/releases/download/${tag}/go-containerregistry_${os}_${arch}.tar.gz | tar xz ${out} | ||||||
| url=https://github.com/google/go-containerregistry/releases/download/${tag}/go-containerregistry_${os}_${arch}.tar.gz | ||||||
| curl -fsL \ | ||||||
| --remove-on-error --retry 10 --retry-max-time 120 \ | ||||||
| -o out.tar.gz ${url} || exit 1 | ||||||
| tar xz -f out.tar.gz ${out} | ||||||
|
||||||
| tar xz -f out.tar.gz ${out} | |
| tar xzf out.tar.gz ${out} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
--remove-on-errorflag is not available in older versions of curl (it was added in curl 7.83.0, released in April 2022). Consider verifying that the GitHub Actions runners have a compatible curl version, or provide a fallback mechanism. Alternatively, you could manually remove the file on error:curl -fsL --retry 10 --retry-max-time 120 -o out.tar.gz ${url} || { rm -f out.tar.gz; exit 1; }