-
Notifications
You must be signed in to change notification settings - Fork 215
/
OpenWrt-Build-Cli-H3.yml
120 lines (100 loc) · 3.7 KB
/
OpenWrt-Build-Cli-H3.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#
# This is free software, lisence use MIT.
#
# Copyright (C) 2019 Jolly <https://totoro.site>
#
# <https://github.com/skytotwo/NanoPi-R1S-Build-By-Actions>
#
# Write by Jolly 2019/12/7
# last update at 2019/12/19
name: NanoPi-R1s H3 OpenWrt 19.07 Build
on:
push:
branches:
- master
# schedule:
# - cron: 0 20 * * *
# release:
# types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
ref: master
- name: Initialization Environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
wget -O - https://raw.githubusercontent.com/friendlyarm/build-env-on-ubuntu-bionic/master/install.sh | bash
- name: Install Repo
run: |
git clone https://github.com/friendlyarm/repo
sudo cp repo/repo /usr/bin/
- name: Download Source
run: |
mkdir friendlywrt-h3
cd friendlywrt-h3
repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master -m h3.xml --repo-url=https://github.com/friendlyarm/repo --no-clone-bundle
- name: Merge UpStearm OpenWrt
run: |
cd friendlywrt-h3
cd .repo/manifests
rm -f ./h3.xml
wget https://raw.githubusercontent.com/skytotwo/NanoPi-R1S-Build-By-Actions/master/source_xml/h3_19.07.xml
cp h3_19.07.xml h3.xml
rm -rf ./h3_19.07.xml
repo sync -c --no-clone-bundle
- name: Merge LEDE
run: |
cd friendlywrt-h3
git clone https://github.com/coolsnowwolf/lede
cd friendlywrt
cp -r ../lede/package/lean package/
sed -i 's/https:\/\/git.openwrt.org\/project\/luci.git^039ef1f4deba725d3591b159bbc9569885d68131/https:\/\/github.com\/coolsnowwolf\/luci/' feeds.conf.default
sed -i 's/https:\/\/git.openwrt.org\/feed\/packages.git^00803ffc91e80b16e9c1603ff32106d42e255923/https:\/\/github.com\/coolsnowwolf\/packages/' feeds.conf.default
- name: Custom Applications
run: |
cd friendlywrt-h3/friendlywrt/package
git clone https://github.com/Baozisoftware/luci-app-koolproxy
- name: Update Target.mk
run: |
cd friendlywrt-h3/friendlywrt/include
sed -i 's/dnsmasq /dnsmasq-full default-settings luci/' target.mk
- name: Update Feeds
run: |
cd friendlywrt-h3/friendlywrt
./scripts/feeds update -a
./scripts/feeds install -a
- name: Costom Configure File
run: |
cd friendlywrt-h3/friendlywrt
rm -f ./.config*
wget https://raw.githubusercontent.com/skytotwo/NanoPi-R1S-Build-By-Actions/master/r1s-h3-config
cp r1s-h3-config .config
- name: Download package
if: always()
run: |
cd friendlywrt-h3/friendlywrt
make download -j8
find dl -size -1024c -exec ls -l {} \;
find dl -size -1024c -exec rm -f {} \;
- name: Build OpenWrt
run: |
cd friendlywrt-h3
./build.sh nanopi_r1s.mk
- name: Zip Files
run: |
find friendlywrt-h3/out/ -name "FriendlyWrt_*img*" | xargs -i zip -r {}.zip {}
- name: Assemble Artifact
run: |
rm -rf ./artifact/
mkdir -p ./artifact/
find friendlywrt-h3/out/ -name "FriendlyWrt_*img.zip*" | xargs -i mv -f {} ./artifact/
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: FriendlyWrt_NanoPi-R1S H3 v19.07
path: ./artifact/