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

Conversation

raighnew
Copy link
Contributor

image Catch docker compose exit code in run script

@raighnew raighnew closed this Sep 26, 2024
@raighnew raighnew reopened this Sep 26, 2024
@raighnew raighnew closed this Sep 26, 2024
@raighnew raighnew reopened this Sep 26, 2024
@raighnew
Copy link
Contributor Author

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

Copy link
Owner

@EkkoG EkkoG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@raighnew
Copy link
Contributor Author

raighnew commented Sep 28, 2024 via email

@EkkoG
Copy link
Owner

EkkoG commented Sep 29, 2024

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

@raighnew
Copy link
Contributor Author

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

@EkkoG
Copy link
Owner

EkkoG commented Sep 30, 2024

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

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

@raighnew
Copy link
Contributor Author

raighnew commented Sep 30, 2024 via email

@EkkoG
Copy link
Owner

EkkoG commented Sep 30, 2024

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

@raighnew
Copy link
Contributor Author

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

@EkkoG
Copy link
Owner

EkkoG commented Sep 30, 2024

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

@raighnew
Copy link
Contributor Author

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

@EkkoG
Copy link
Owner

EkkoG commented Sep 30, 2024

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

@EkkoG
Copy link
Owner

EkkoG commented Sep 30, 2024

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

@raighnew raighnew changed the title fix: catch docker compose error code Catch compose build error in actions Sep 30, 2024
@raighnew
Copy link
Contributor Author

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

@EkkoG EkkoG merged commit 2f68b26 into EkkoG:master Sep 30, 2024
1 check passed
@EkkoG
Copy link
Owner

EkkoG commented Sep 30, 2024

感谢你的贡献!

@raighnew raighnew deleted the fix-compose-status branch September 30, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants