Skip to content

Commit 382490c

Browse files
committed
Retry curl transfer failures
1 parent d88cd15 commit 382490c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ runs:
129129
mkdir -p ~/swift-download
130130
cd ~/swift-download
131131
if [ ${RUNNER_OS} == 'Linux' ]; then
132-
curl -fsSL https://download.swift.org/swift-${{ steps.setup.outputs.swift-version }}-release/${{ steps.setup.outputs.osid }}/${SWIFT_ID}/${SWIFT_ID}-${{ steps.setup.outputs.osidpair }}.tar.gz --output swift.tar.gz
132+
curl -fsSL --retry 8 --retry-all-errors https://download.swift.org/swift-${{ steps.setup.outputs.swift-version }}-release/${{ steps.setup.outputs.osid }}/${SWIFT_ID}/${SWIFT_ID}-${{ steps.setup.outputs.osidpair }}.tar.gz --output swift.tar.gz
133133
elif [ ${RUNNER_OS} == 'macOS' ]; then
134-
curl -fsSL https://download.swift.org/swift-${{ steps.setup.outputs.swift-version }}-release/xcode/${SWIFT_ID}/${SWIFT_ID}-osx.pkg --output swift.pkg
134+
curl -fsSL --retry 8 --retry-all-errors https://download.swift.org/swift-${{ steps.setup.outputs.swift-version }}-release/xcode/${SWIFT_ID}/${SWIFT_ID}-osx.pkg --output swift.pkg
135135
else
136136
echo "::error::Unsupported platform: ${RUNNER_OS}"
137137
exit 1
@@ -178,7 +178,7 @@ runs:
178178
179179
mkdir -p ${RUNNER_TEMP}/swift-android-toolchain
180180
cd ${RUNNER_TEMP}/swift-android-toolchain
181-
curl -fsSL https://github.com/skiptools/swift-android-toolchain/releases/download/${{ steps.setup.outputs.swift-version }}/${SWIFT_SDK_ID}.artifactbundle.tar.gz --output ${SWIFT_SDK_ID}.artifactbundle.tar.gz
181+
curl -fsSL --retry 8 --retry-all-errors https://github.com/skiptools/swift-android-toolchain/releases/download/${{ steps.setup.outputs.swift-version }}/${SWIFT_SDK_ID}.artifactbundle.tar.gz --output ${SWIFT_SDK_ID}.artifactbundle.tar.gz
182182
183183
# first check if it already installed (we may be running this workflow multiple times for an action, in which case it will already be present)
184184
${SWIFT_INSTALLATION}/bin/swift sdk configure --show-configuration ${SWIFT_SDK_ID} ${SWIFT_SDK_TARGET} &> /dev/null || ${SWIFT_INSTALLATION}/bin/swift sdk install ${SWIFT_SDK_ID}.artifactbundle.tar.gz

0 commit comments

Comments
 (0)