Skip to content

Build both ipk and apk packages for OpenWrt 24.10+#8

Merged
HudsonGraeme merged 7 commits intodevfrom
fix/apk-package-format
Mar 16, 2026
Merged

Build both ipk and apk packages for OpenWrt 24.10+#8
HudsonGraeme merged 7 commits intodevfrom
fix/apk-package-format

Conversation

@HudsonGraeme
Copy link
Copy Markdown
Owner

@HudsonGraeme HudsonGraeme commented Mar 16, 2026

Summary

  • 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
  • The release workflow now builds both .ipk and .apk formats per architecture so both opkg and apk users are supported

Test plan

  • Trigger a release build and verify both .ipk and .apk artifacts are uploaded per architecture
  • Install .apk on an OpenWrt 24.10+ device using apk add --allow-untrusted
  • Verify .ipk installs still work on opkg-based devices

Summary by CodeRabbit

  • Chores
    • Updated the release workflow to support packaging applications in both APK and IPK formats, providing users with multiple installation options in releases.

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.
@HudsonGraeme HudsonGraeme force-pushed the fix/apk-package-format branch from 1859fe2 to 2048220 Compare March 16, 2026 02:30
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 16, 2026

Warning

Rate limit exceeded

@HudsonGraeme has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 42 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3041dc11-c4ee-416f-a71a-6b64685aa50f

📥 Commits

Reviewing files that changed from the base of the PR and between 2048220 and 2562954.

📒 Files selected for processing (2)
  • .github/workflows/build-release.yml
  • README.md
📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
Release Workflow Dual-Package Support
.github/workflows/build-release.yml
Added APK packaging pipeline alongside existing IPK flow. Includes new build configuration for APK, file discovery logic with step ID find_apk, versioned file renaming, and GitHub output exports. Updated IPK step ID from find_package to find_ipk. Both packages now included in release uploads with warning-level handling for missing APK.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hoppy hops through the build machines so fine,
Two packages now bundle in perfect design—
APK and IPK, a dual delight,
Both compiled and packaged, ready to flight!
📦✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Build both ipk and apk packages for OpenWrt 24.10+' clearly and specifically describes the main change: adding APK package building alongside IPK packages in the release workflow for OpenWrt 24.10+ compatibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/apk-package-format
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.
@HudsonGraeme HudsonGraeme added the run-build Trigger package build on PR label Mar 16, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6db0967 and 2048220.

📒 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
@HudsonGraeme
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 16, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.
@HudsonGraeme HudsonGraeme merged commit f12551e into dev Mar 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-build Trigger package build on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant