Skip to content

Update openwrt-awg.yml #80

Update openwrt-awg.yml

Update openwrt-awg.yml #80

Workflow file for this run

name: Create Release Mediatek Filogic
#on: [push]
on:
push:
tags:
- "snapshot"
jobs:
build:
name: "${{ 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: ['snapshot']
build_env:
- pkgarch: aarch64_cortex-a53
target: mediatek
subtarget: filogic
steps:
- uses: actions/checkout@v4
with:
repository: openwrt/openwrt
ref: master
fetch-depth: 0
- name: Update and install feeds for OpenWRT_${{ 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
wget https://downloads.openwrt.org/snapshots/targets/${target}/${subtarget}/feeds.buildinfo -O feeds.conf
echo "src-git awgopenwrt https://github.com/lolo6oT/awg-openwrt.git;dev-snapshot" >> ./feeds.conf
./scripts/feeds update -a
./scripts/feeds install -a
wget https://downloads.openwrt.org/snapshots/targets/${target}/${subtarget}/config.buildinfo -O .config
make defconfig
- name: Make Download and World OpenWRT_${{ 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-proto-amneziawg=y" >> .config
echo "CONFIG_PACKAGE_amneziawg-go=y" >> .config
if [[ $(uname -m) == "aarch64" ]]; then
echo 'CONFIG_GOLANG_EXTERNAL_BOOTSTRAP_ROOT="/usr/local/go/bin/go"' >> .config
echo 'CONFIG_GOLANG_BUILD_CACHE_DIR=""' >> .config
fi
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)
- name: Make apks amnezia_${{ github.ref_name }} for original OpenWRT_${{ matrix.tag }} ${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}
run: |
make -j $(nproc) package/amneziawg-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-proto-amneziawg/{clean,download,prepare,compile}
- name: Prepare artifacts OpenWRT_${{ matrix.tag }} ${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}
run: |
tag_name=${{ github.ref_name }}
mkdir -p awgrelease
postfix="${{ matrix.tag }}_${{ matrix.build_env.pkgarch}}_${{ matrix.build_env.target}}_${{ matrix.build_env.subtarget}}"
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/amneziawg-tools-*.apk awgrelease/amneziawg-tools-${postfix}.apk
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/amneziawg-go-*.apk awgrelease/amneziawg-go-${postfix}.apk
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/luci-proto-amneziawg-*.apk awgrelease/luci-proto-amneziawg-${postfix}.apk
cp bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/kmod-amneziawg-*.apk awgrelease/kmod-amneziawg-${postfix}.apk
- name: Release
uses: softprops/action-gh-release@v1
with:
files: awgrelease/*.apk
- name: Cleanup
run: |
rm feeds.conf || true
rm -rf awgrelease || true