diff --git a/.changeset/patch-retry-downloads.md b/.changeset/patch-retry-downloads.md new file mode 100644 index 00000000000..42e76525876 --- /dev/null +++ b/.changeset/patch-retry-downloads.md @@ -0,0 +1,4 @@ +--- +"gh-aw": patch +--- +Add curl --retry 3 --retry-delay 5 to installer downloads so transient 502s no longer fail workflows. diff --git a/actions/setup/sh/install_awf_binary.sh b/actions/setup/sh/install_awf_binary.sh index ff92b45e243..4fbb46bb891 100755 --- a/actions/setup/sh/install_awf_binary.sh +++ b/actions/setup/sh/install_awf_binary.sh @@ -61,7 +61,7 @@ trap 'rm -rf "$TEMP_DIR"' EXIT # Download checksums echo "Downloading checksums from ${CHECKSUMS_URL@Q}..." -curl -fsSL -o "${TEMP_DIR}/checksums.txt" "${CHECKSUMS_URL}" +curl -fsSL --retry 3 --retry-delay 5 -o "${TEMP_DIR}/checksums.txt" "${CHECKSUMS_URL}" verify_checksum() { local file="$1" @@ -99,7 +99,7 @@ install_linux_binary() { local binary_url="${BASE_URL}/${awf_binary}" echo "Downloading binary from ${binary_url@Q}..." - curl -fsSL -o "${TEMP_DIR}/${awf_binary}" "${binary_url}" + curl -fsSL --retry 3 --retry-delay 5 -o "${TEMP_DIR}/${awf_binary}" "${binary_url}" # Verify checksum verify_checksum "${TEMP_DIR}/${awf_binary}" "${awf_binary}" @@ -124,7 +124,7 @@ install_darwin_binary() { local binary_url="${BASE_URL}/${awf_binary}" echo "Downloading binary from ${binary_url@Q}..." - curl -fsSL -o "${TEMP_DIR}/${awf_binary}" "${binary_url}" + curl -fsSL --retry 3 --retry-delay 5 -o "${TEMP_DIR}/${awf_binary}" "${binary_url}" # Verify checksum verify_checksum "${TEMP_DIR}/${awf_binary}" "${awf_binary}" diff --git a/actions/setup/sh/install_copilot_cli.sh b/actions/setup/sh/install_copilot_cli.sh index 3a508e19eab..050bf4f9892 100755 --- a/actions/setup/sh/install_copilot_cli.sh +++ b/actions/setup/sh/install_copilot_cli.sh @@ -87,11 +87,11 @@ trap 'rm -rf "$TEMP_DIR"' EXIT # Download checksums echo "Downloading checksums from ${CHECKSUMS_URL}..." -curl -fsSL -o "${TEMP_DIR}/SHA256SUMS.txt" "${CHECKSUMS_URL}" +curl -fsSL --retry 3 --retry-delay 5 -o "${TEMP_DIR}/SHA256SUMS.txt" "${CHECKSUMS_URL}" # Download binary tarball echo "Downloading binary from ${TARBALL_URL}..." -curl -fsSL -o "${TEMP_DIR}/${TARBALL_NAME}" "${TARBALL_URL}" +curl -fsSL --retry 3 --retry-delay 5 -o "${TEMP_DIR}/${TARBALL_NAME}" "${TARBALL_URL}" # Verify checksum echo "Verifying SHA256 checksum for ${TARBALL_NAME}..."