Build both ipk and apk packages for OpenWrt 24.10+#8
Conversation
OpenWrt 24.10+ defaults to APK as the package manager on many targets. Users on these builds get "v2 package format error" when installing .ipk files with `apk add`. This builds both formats per architecture so both opkg and apk users are supported.
1859fe2 to
2048220
Compare
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe release workflow now supports building and packaging both APK and IPK formats. New steps configure APK compilation, locate the built APK file, rename it with version information, and expose both package paths for release asset upload. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Allows triggering the full build matrix on PRs by adding a "run-build" label. Builds also re-trigger on push if the label is present. PR builds upload artifacts instead of attaching to a release.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/build-release.yml:
- Around line 146-151: The Upload to release step fails when
steps.find_apk.outputs.package_name is empty because softprops/action-gh-release
will try to upload the directory path "/tmp/"; update the workflow to avoid
passing an empty file path by either (A) splitting the upload into two
conditional steps that call softprops/action-gh-release separately (one step for
/tmp/${{ steps.find_ipk.outputs.package_name }} and a second step with if:
steps.find_apk.outputs.package_name != '' to upload /tmp/${{
steps.find_apk.outputs.package_name }}), or (B) add a prior step that builds a
single files list output only including non-empty package names and pass that
output to the existing Upload to release step; reference the existing step names
find_apk, find_ipk and the Upload to release step using
softprops/action-gh-release when making the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 25c451c9-3a0b-4e47-b4f6-baf9df22f3ec
📒 Files selected for processing (1)
.github/workflows/build-release.yml
When the APK build is not found, the package_name output is empty, causing the upload path to resolve to /tmp/ which fails. Split uploads into conditional steps gated on find_apk.outputs.found.
CONFIG_USE_APK is marked BROKEN in the 24.10 SDK and the apk host binary is absent, so it cannot produce apk packages. Split into two parallel job matrices: 24.10.5 SDK produces ipk for opkg devices, 25.12.0 SDK (which ships apk as default) produces apk for devices running apk.
…k-package-format # Conflicts: # .github/workflows/build-release.yml
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
APK mkpkg rejects versions with hyphens in the base (0.0.0-pr8). Use dot-separated format (0.0.0.8) which is valid for both ipk and apk.
Add OpenWrt 25.12+ apk install commands alongside existing opkg instructions. Update architecture list to use actual package suffixes.
Summary
v2 package format errorwhen installing.ipkfiles withapk add.ipkand.apkformats per architecture so both opkg and apk users are supportedTest plan
.ipkand.apkartifacts are uploaded per architecture.apkon an OpenWrt 24.10+ device usingapk add --allow-untrusted.ipkinstalls still work on opkg-based devicesSummary by CodeRabbit