Skip to content

Build for openwrt

Build for openwrt #4

Workflow file for this run

name: Build for openwrt
on:
repository_dispatch:
workflow_dispatch:
inputs:
tag:
description: 'Tag to release'
required: true
default: 'v0.0.1'
jobs:
openwrt:
name: OpenWrt Package - ${{ matrix.target.arch }}
runs-on: ubuntu-latest
environment: OpenWrt
strategy:
matrix:
target:
- arch: "mediatek_filogic"
sdk: "https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-sdk-mediatek-filogic_gcc-12.3.0_musl.Linux-x86_64.tar.xz"
- arch: "x86_64"
sdk: "https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-sdk-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz"
steps:
- uses: actions/checkout@v2
- name: Install build requirements
run: |
sudo apt-get update
sudo apt-get install -y build-essential ccache ecj fastjar file g++ gawk \
gettext git java-propose-classpath libelf-dev libncurses5-dev \
libncursesw5-dev libssl-dev python2.7-dev python3 unzip wget \
python3-distutils python3-setuptools python3-dev rsync subversion \
swig time xsltproc zlib1g-dev
- name: Install OpenWrt SDK
run: |
wget -O openwrt-sdk.tar.xz ${{ matrix.target.sdk }}
xz -q -d openwrt-sdk.tar.xz && tar -xvf openwrt-sdk.tar
mv -f openwrt-sdk-* openwrt-sdk
- name: Build Package
run: |
echo "src-link vbeauty $GITHUB_WORKSPACE/" > openwrt-sdk/feeds.conf
echo 'CONFIG_PACKAGE_luci-theme-vbeauty=y
' >> openwrt-sdk/.config
cd openwrt-sdk
cat feeds.conf.default >> feeds.conf
cat feeds.conf
./scripts/feeds update -a > /dev/null
make defconfig
./scripts/feeds install -d y -p "vbeauty" -f -a
make package/luci-theme-vbeauty/compile V=s
tree bin/packages/
- name: Archive luci packages
uses: actions/upload-artifact@v2
with:
name: luci-theme-vbeauty-openwrt-${{ matrix.target.arch }}
path: openwrt-sdk/bin/packages/*/vbeauty/luci-theme-vbeauty*.ipk
if-no-files-found: error
- name: Upload luci packages to GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
overwrite: true
file: openwrt-sdk/bin/packages/*/vbeauty/luci-*.ipk
tag: "refs/tags/${{ github.event.inputs.tag }}"