Update openwrt-awg.yml #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release Mediatek Filogic | |
#on: [push] | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
name: "v${{ matrix.tag }} - ${{ matrix.build_env.pkgarch}} :: ${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}} build" | |
runs-on: Linux | |
#runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
tag: ['23.05.2'] | |
build_env: | |
- pkgarch: aarch64_cortex-a53 | |
target: mediatek | |
subtarget: filogic | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: openwrt/openwrt | |
ref: v${{ matrix.tag }} | |
fetch-depth: 0 | |
- name: Update and install feeds for OpenWRT_v${{ matrix.tag }} ${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}} | |
run: | | |
pkgarch=${{ matrix.build_env.pkgarch}} | |
target=${{ matrix.build_env.target}} | |
subtarget=${{ matrix.build_env.subtarget}} | |
echo "pkgarch: ${pkgarch}, target: ${target}, subtarget: ${subtarget}" | |
rm -rf bin/packages/${pkgarch}/awgopenwrt/ || true | |
rm -rf bin/targets/${target}/${subtarget}/packages/ || true | |
cp -rp feeds.conf.default feeds.conf | |
echo "src-git awgopenwrt https://github.com/lolo6oT/awg-openwrt.git" >> ./feeds.conf | |
./scripts/feeds update -a | |
./scripts/feeds install -a | |
wget https://downloads.openwrt.org/releases/${{ matrix.tag }}/targets/${target}/${subtarget}/config.buildinfo -O .config | |
make defconfig | |
- name: Make Download and World OpenWRT_v${{ matrix.tag }} ${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}} | |
run: | | |
export FORCE_UNSAFE_CONFIGURE=1 | |
echo "CONFIG_PACKAGE_kmod-amneziawg=m" >> .config | |
echo "CONFIG_PACKAGE_amneziawg-tools=y" >> .config | |
echo "CONFIG_PACKAGE_luci-app-amneziawg=y" >> .config | |
echo "CONFIG_PACKAGE_amneziawg-go=y" >> .config | |
make defconfig | |
#make -j $(nproc) V=sc download world | |
echo "Make tools/install" | |
make tools/install -i -j $(nproc) | |
echo "Make toolchain/install" | |
make toolchain/install -i -j $(nproc) | |
echo "Make Kernel Compile" | |
make target/linux/compile -i -j $(nproc) V=s | |
- name: Make ipks amnezia_${{ github.ref_name }} for original OpenWRT_v${{ matrix.tag }} ${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}} | |
run: | | |
make -j $(nproc) package/amnezia-wg-tools/{clean,download,prepare,compile} | |
make -j $(nproc) package/amneziawg-go/{clean,download,prepare,compile} | |
make -j $(nproc) package/kmod-amneziawg/{clean,download,prepare,compile} | |
make -j $(nproc) package/luci-app-amneziawg/{clean,download,prepare,compile} | |
- name: Prepare artifacts OpenWRT_v${{ matrix.tag }} ${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}} | |
run: | | |
tag_name=${{ github.ref_name }} | |
mkdir -p awgrelease | |
postfix="${tag_name}_v${{ matrix.tag }}_${{ matrix.build_env.pkgarch}}_${{ matrix.build_env.target}}_${{ matrix.build_env.subtarget}}" | |
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/amneziawg-tools_*.ipk awgrelease/amneziawg-tools_${postfix}.ipk | |
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/amneziawg-go_*.ipk awgrelease/amneziawg-go_${postfix}.ipk | |
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/luci-app-amneziawg_*.ipk awgrelease/luci-app-amneziawg_${postfix}.ipk | |
cp bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/kmod-amneziawg_*.ipk awgrelease/kmod-amneziawg_${postfix}.ipk | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: awgrelease/*.ipk | |
- name: Cleanup | |
run: | | |
rm feeds.conf || true | |
rm -rf awgrelease || true |