Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch compose build error in actions #5

Merged
merged 4 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
./run.sh --image=openwrt/imagebuilder:x86-64-21.02.7
4 changes: 2 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading