GitHub CI action to build packages via SDK using official OpenWrt SDK Docker containers. This is primary used to test build OpenWrt repositories but can also be used for downstream projects maintaining their own package repositories.
The following YAML code can be used to build all packages of a repository and
store created ipk files as artifacts.
name: Test Build
on:
pull_request:
branches:
- main
jobs:
build:
name: ${{ matrix.arch }} build
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- x86_64
- mips_24kc
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build
uses: openwrt/gh-action-sdk@main
env:
ARCH: ${{ matrix.arch }}
- name: Store packages
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.arch}}-packages
path: bin/packages/${{ matrix.arch }}/packages/*.ipkThe action reads a few env variables:
ARCHdetermines the used OpenWrt SDK Docker container. E.g.x86_64orx86_64-22.03.2.ARTIFACTS_DIRdetermines where built packages and build logs are saved. Defaults to the default working directory (GITHUB_WORKSPACE).BUILD_LOGstores build logs in./logs.CONTAINERcan set other SDK containers thanopenwrt/sdk.EXTRA_FEEDSare added to thefeeds.conf, where|are replaced by white spaces.FEED_DIRused in the createdfeeds.conffor the current repo. Defaults to the default working directory (GITHUB_WORKSPACE).FEEDNAMEused in the createdfeeds.conffor the current repo. Defaults toaction.IGNORE_ERRORScan ignore failing packages builds.INDEXmakes the action build the package index. Default is 0. Set to 1 to enable.KEY_BUILDcan be a private Signify/usignkey to sign the packages (ipk) feed.PRIVATE_KEYcan be a private key to sign the packages (apk) feed.NO_DEFAULT_FEEDSdisable adding the default SDK feedsNO_REFRESH_CHECKdisable check if patches need a refresh.NO_SHFMT_CHECKdisable check if init files are formatedPACKAGES(Optional) specify the list of packages (space separated) to be builtVchanges the build verbosity level.