forked from yury-sannikov/awg-openwrt
-
Notifications
You must be signed in to change notification settings - Fork 11
85 lines (70 loc) · 3.56 KB
/
openwrt-awg.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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) download world
- 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/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/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