Skip to content

Commit 213db90

Browse files
committed
ci: add ubuntu setup fallback when setup-swift fails
1 parent 0dc41d0 commit 213db90

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/swift.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ jobs:
3333
os: [ubuntu-22.04]
3434
swift-version: ["6.1"]
3535
steps:
36-
- name: Setup Swift toolchain
36+
- name: Setup Swift toolchain (action)
37+
id: swift_setup_action
38+
continue-on-error: true
39+
uses: swift-actions/setup-swift@v3
40+
with:
41+
swift-version: ${{ matrix.swift-version }}
42+
- name: Setup Swift toolchain (fallback)
43+
if: ${{ steps.swift_setup_action.outcome != 'success' }}
3744
run: |
3845
curl -sL "https://download.swift.org/swift-${{ matrix.swift-version }}-release/ubuntu22.04/swift-${{ matrix.swift-version }}-RELEASE/swift-${{ matrix.swift-version }}-RELEASE-ubuntu22.04.tar.gz" -o swift-toolchain.tar.gz
3946
tar xf swift-toolchain.tar.gz

0 commit comments

Comments
 (0)