From 3930f9bf5d511944c58778fa3bde37ceee742d98 Mon Sep 17 00:00:00 2001 From: Raighne Weng Date: Thu, 26 Sep 2024 09:03:03 +0800 Subject: [PATCH 1/4] fix: catch docker compose error code --- run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index 68e2435..2c5b758 100755 --- a/run.sh +++ b/run.sh @@ -116,13 +116,13 @@ if [[ $(uname) =~ "Linux" ]]; then sudo chown -R 1000:1000 bin fi -compose up --remove-orphans +compose up --exit-code-from imagebuilder --remove-orphans build_status=$? compose rm -f rm docker-compose.yml if [ $build_status -ne 0 ]; then - echo "build failed" + echo "build failed with exit code $build_status" exit 1 else ls -R bin From 47226f14cb65b266b25f7b18457791919b901349 Mon Sep 17 00:00:00 2001 From: Raighne Weng Date: Thu, 26 Sep 2024 11:52:36 +0800 Subject: [PATCH 2/4] fix: PARTSIZE --- .github/workflows/main.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec44ef7..92effd3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,14 +6,14 @@ name: CI on: # Triggers the workflow on push or pull request events but only for the "master" branch push: - branches: [ "master" ] + branches: ["master"] paths: - - '**' - - '!README*' - - '!changelog.txt' + - "**" + - "!README*" + - "!changelog.txt" pull_request: - branches: [ "master" ] + branches: ["master"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -33,11 +33,13 @@ jobs: # Runs a single command using the runners shell - name: Build image run: | + echo "CONFIG_TARGET_KERNEL_PARTSIZE=16" >> .env + echo "CONFIG_TARGET_ROOTFS_PARTSIZE=256" >> .env echo "PPPOE_USERNAME=123" >> modules/network/.env echo "PPPOE_PASSWORD=123" >> modules/network/.env echo "LAN_IP=192.168.1.1" >> modules/network/.env echo "CLASH_CONFIG_URL=https://gist.github.com/EkkoG/20a52db0169c4a4769689521b1c5500e/raw/cf61a9397d0bdbd5b6bbad8fbb388ec851116470/clash_example.yaml" >> modules/openclash/.env - echo "MODULES=openclash openclash-as-default" > .env + echo "MODULES=openclash openclash-as-default" >> .env ./run.sh --image=openwrt/imagebuilder:x86-64-23.05.0-rc3 ./run.sh --image=openwrt/imagebuilder:x86-64-22.03.3 - ./run.sh --image=openwrt/imagebuilder:x86-64-21.02.7 \ No newline at end of file + ./run.sh --image=openwrt/imagebuilder:x86-64-21.02.7 From 0ed353f61a0eacf4f9ba5e24670229439b2bbdca Mon Sep 17 00:00:00 2001 From: Raighne Weng Date: Mon, 30 Sep 2024 19:28:49 +0800 Subject: [PATCH 3/4] chore: revert workflow format --- .github/workflows/main.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 92effd3..d2801b4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,14 +6,14 @@ name: CI on: # Triggers the workflow on push or pull request events but only for the "master" branch push: - branches: ["master"] + branches: [ "master" ] paths: - - "**" - - "!README*" - - "!changelog.txt" + - '**' + - '!README*' + - '!changelog.txt' pull_request: - branches: ["master"] + branches: [ "master" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -33,13 +33,13 @@ jobs: # Runs a single command using the runners shell - name: Build image run: | - echo "CONFIG_TARGET_KERNEL_PARTSIZE=16" >> .env - echo "CONFIG_TARGET_ROOTFS_PARTSIZE=256" >> .env echo "PPPOE_USERNAME=123" >> modules/network/.env echo "PPPOE_PASSWORD=123" >> modules/network/.env echo "LAN_IP=192.168.1.1" >> modules/network/.env echo "CLASH_CONFIG_URL=https://gist.github.com/EkkoG/20a52db0169c4a4769689521b1c5500e/raw/cf61a9397d0bdbd5b6bbad8fbb388ec851116470/clash_example.yaml" >> modules/openclash/.env + echo "CONFIG_TARGET_KERNEL_PARTSIZE=16" >> .env + echo "CONFIG_TARGET_ROOTFS_PARTSIZE=256" >> .env echo "MODULES=openclash openclash-as-default" >> .env - ./run.sh --image=openwrt/imagebuilder:x86-64-23.05.0-rc3 + ./run.sh --image=openwrt/imagebuilder:x86-64-23.05.5 ./run.sh --image=openwrt/imagebuilder:x86-64-22.03.3 ./run.sh --image=openwrt/imagebuilder:x86-64-21.02.7 From 02b487d379d590fee0e375cde6a023492e1e836f Mon Sep 17 00:00:00 2001 From: Ekko Date: Mon, 30 Sep 2024 21:05:47 +0800 Subject: [PATCH 4/4] chore: use new .env when run --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2801b4..1d21fa3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: echo "PPPOE_PASSWORD=123" >> modules/network/.env echo "LAN_IP=192.168.1.1" >> modules/network/.env echo "CLASH_CONFIG_URL=https://gist.github.com/EkkoG/20a52db0169c4a4769689521b1c5500e/raw/cf61a9397d0bdbd5b6bbad8fbb388ec851116470/clash_example.yaml" >> modules/openclash/.env - echo "CONFIG_TARGET_KERNEL_PARTSIZE=16" >> .env + echo "CONFIG_TARGET_KERNEL_PARTSIZE=16" > .env echo "CONFIG_TARGET_ROOTFS_PARTSIZE=256" >> .env echo "MODULES=openclash openclash-as-default" >> .env ./run.sh --image=openwrt/imagebuilder:x86-64-23.05.5