EkkoG / OpenWrt

基于 OpenWrt/ImmortalWrt 官方 ImageBuilder 的自定义固件,集成常用软件,开机即可用,使用 Docker 编译,无需配置编译环境
https://github.com/EkkoG/OpenWrt
91 stars 27 forks source link

Catch compose build error in actions #5

Closed raighnew closed 1 month ago

raighnew commented 1 month ago
image

Catch docker compose exit code in run script

raighnew commented 1 month ago

I apologize for turning PR off/on again and again, the changes are now ready for review.

raighnew commented 1 month ago

那你建议是移除workflow的更改么,这会导致action编译失败。

On Sun, 29 Sep 2024 at 00:18, Ekko @.***> wrote:

@.**** commented on this pull request.

workflow 只是一个 Ci,用来检查能不能正常构建固件的,并不是默认配置或者推荐配置,所以对 workflow 的配置的修改不是很有必要

— Reply to this email directly, view it on GitHub https://github.com/EkkoG/OpenWrt/pull/5#pullrequestreview-2335310296, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSB55YELES4CHIG7YC5R2DZY3JDRAVCNFSM6AAAAABO33GSSCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMZVGMYTAMRZGY . You are receiving this because you modified the open/close state.Message ID: @.***>

EkkoG commented 1 month ago

https://github.com/EkkoG/OpenWrt/actions/runs/9330839185 不会失败,为什么这个 PR 去掉 workflow 的更改会失败,因为改了 run.sh 吗

raighnew commented 1 month ago

是的,增加 --exit-code-from 到了打包步骤就会提示空间不足。

EkkoG commented 1 month ago

--exit-code-from Return the exit code of the selected service container. Implies --abort-on-

这个选项看起来只影响 exit-code,不太可能和空间相关,如果你有空间不足的情况,应该是真的空间不足了,而不是因为加了这个选项,请确认给docker 还有可用空间,桌面版docker 有空间限制,镜像之类的文建都会计算进去

raighnew commented 1 month ago

我还没有弄清为什么会引起空间不足,我昨天在Actions测试过了 1. 在ubuntu-lastest 里先清理出了20G空间 2. docker run之前再清理 docker image 空间。最后还是把提示空间不足,没弄懂,我看看假期找个时间再研究研究。

On Mon, 30 Sept 2024 at 09:29, Ekko @.***> wrote:

--exit-code-from Return the exit code of the selected service container. Implies --abort-on-

这个选项看起来只影响 exit-code,不太可能和空间相关,如果你有空间不足的情况,应该是真的空间不足了,而不是因为加了这个选项,请确认给docker 还有可用空间,桌面版docker 有空间限制,镜像之类的文建都会计算进去

— Reply to this email directly, view it on GitHub https://github.com/EkkoG/OpenWrt/pull/5#issuecomment-2381835749, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSB553R4LTYWXKE3ZF4L5TZZCSPBAVCNFSM6AAAAABO33GSSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBRHAZTKNZUHE . You are receiving this because you modified the open/close state.Message ID: @.***>

EkkoG commented 1 month ago

试了一下 https://github.com/EkkoG/OpenWrt/actions/runs/11098426991/job/30831085201#step:3:3712 不加 --exit-code-from 都会报错,只是 docker-compose 命令会成功所以 CI 绿了

raighnew commented 1 month ago

我之前Build过成功一次,然后 opkg install 的时候发现空间不够,查资料发现 CONFIG_TARGET_ROOTFS_PARTSIZE 这个参数可以调整磁盘空间,是因为默认CONFIG_TARGET_ROOTFS_PARTSIZE为104M,空间不够安装packages了么

EkkoG commented 1 month ago

看起来确实相关,默认的大小装不下这么多包

raighnew commented 1 month ago

那我们可以把CONFIG_TARGET_ROOTFS_PARTSIZE写在workflow里么,我看传统的编译方式也是这样做的。

EkkoG commented 1 month ago

可以,麻烦改一下 review 吧,准备合并

EkkoG commented 1 month ago

另外文件格式的调整建议单独 PR,这次可以一起合并

raighnew commented 1 month ago

我把yaml格式的修改先revert了,只保留了run和PARTSIZE的修改,麻烦看一下和合并。

EkkoG commented 1 month ago

感谢你的贡献!