Skip to content

Commit d7eac25

Browse files
committed
ci: use matrix to test build
1 parent d6ef8c8 commit d7eac25

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,20 @@ on:
2020

2121
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2222
jobs:
23-
# This workflow contains a single job called "build"
2423
build:
25-
# The type of runner that the job will run on
2624
runs-on: ubuntu-latest
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
image:
29+
- "immortalwrt/imagebuilder:x86-64-openwrt-24.10.2"
30+
- "immortalwrt/imagebuilder:x86-64-openwrt-23.05.4"
2731

28-
# Steps represent a sequence of tasks that will be executed as part of the job
2932
steps:
30-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
31-
- uses: actions/checkout@v4
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
3235

33-
# Runs a single command using the runners shell
34-
- name: Build image
36+
- name: Setup environment
3537
run: |
3638
echo "PPPOE_USERNAME=123" >> modules/pppoe/.env
3739
echo "PPPOE_PASSWORD=123" >> modules/pppoe/.env
@@ -40,5 +42,7 @@ jobs:
4042
echo "CONFIG_TARGET_KERNEL_PARTSIZE=16" > .env
4143
echo "CONFIG_TARGET_ROOTFS_PARTSIZE=256" >> .env
4244
echo "MODULES=openclash openclash-as-default" >> .env
43-
./run.sh --image=immortalwrt/imagebuilder:x86-64-openwrt-24.10.2 --mirror=mirrors.cernet.edu.cn
44-
./run.sh --image=immortalwrt/imagebuilder:x86-64-openwrt-23.05.4 --mirror=mirrors.cernet.edu.cn
45+
46+
- name: Build image ${{ matrix.image }}
47+
run: |
48+
./run.sh --image=${{ matrix.image }} --mirror=mirrors.cernet.edu.cn

0 commit comments

Comments
 (0)