Skip to content

Commit c95dd9b

Browse files
committed
wip: matrix job
1 parent 57fb78c commit c95dd9b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/pull_request.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ jobs:
5959
image: registry:2
6060
ports:
6161
- 5000:5000
62+
strategy:
63+
matrix:
64+
example:
65+
- HelloWorldVapor
66+
- HelloWorldHummingbird
6267
steps:
6368
- name: Checkout repository
6469
uses: actions/checkout@v4
@@ -77,18 +82,18 @@ jobs:
7782
7883
- name: Build the example
7984
run: |
80-
cd Examples/HelloWorldHummingbird
85+
cd Examples/${{ matrix.example }}
8186
sed -i'.bak' -e '/swift-container-plugin/ s/(url:.*),/(path: "..\/.."),/' Package.swift
8287
swift package \
8388
--swift-sdk x86_64-swift-linux-musl \
8489
--allow-network-connections all \
8590
build-container-image \
86-
--repository localhost:5000/hummingbird \
91+
--repository localhost:5000/${{ lower(matrix.example) }} \
8792
--from scratch
8893
8994
- name: Run the example
9095
run: |
91-
docker run -d --platform linux/amd64 -p 8080:8080 localhost:5000/hummingbird
96+
docker run -d --platform linux/amd64 -p 8080:8080 localhost:5000/${{ lower(matrix.example) }}
9297
9398
- name: Check that the service is running
9499
run: |

0 commit comments

Comments
 (0)