forked from kenzok8/openwrt_Build
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (96 loc) · 3.33 KB
/
Lean1.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
#=================================================
# Description: Build OpenWrt using GitHub Actions
# Lisence: MIT
# Author: kenzo
#=================================================
name: Lean_5.4.7.*
on:
release:
types: [published]
push:
branches:
- master
schedule:
- cron: 0 8 * * 5
watch:
types: [started]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 检查
uses: actions/checkout@master
- name: 初始化环境
env:
DEBIAN_FRONTEND: noninteractive
run: |
docker rmi `docker images -q`
echo "Deleting files, please wait ..."
sudo rm -rf \
/usr/share/dotnet \
/etc/mysql \
/etc/php
sudo -E apt-get -y purge \
azure-cli \
ghc* \
zulu* \
hhvm \
llvm* \
firefox \
google* \
dotnet* \
powershell \
openjdk* \
mysql* \
php*
sudo -E apt-get update
sudo -E apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev patch python3 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex node-uglify git gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx-ucl libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf wget curl swig rsync
sudo -E apt-get -y autoremove --purge
sudo -E apt-get clean
- name: 克隆源代码
env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_BRANCH: master
run: |
git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt
cd openwrt
sed -i 's/#src-git helloworld/src-git helloworld/g' ./feeds.conf.default
- name: 更新 & 安装 feeds
working-directory: ./openwrt
run: |
./scripts/feeds update -a
./scripts/feeds install -a
./scripts/feeds install -a
- name: 自定义安装源
working-directory: ./openwrt
run: |
git clone https://github.com/xiaorouji/openwrt-passwall package/openwrt-passwall
git clone https://github.com/kenzok8/litte package/litte
- name: 自定义配置文件Lean
env:
CONFIG_FILE: 'Lean.config'
run: |
[ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config
chmod +x ./customize.sh && ./customize.sh
cd openwrt && rm -rf package/litte/naiveproxy && rm -rf package/lean/v2ray && rm -rf package/lean/v2ray-plugin
cp -f package/litte/default-settings package/lean/default-settings/files/zzz-default-settings
cp -f package/litte/banner package/base-files/files/etc/banner
cp -f package/litte/Leandiffconfig .config && make defconfig
git pull && ./scripts/feeds update -a
./scripts/feeds install -a
- name: 下载包文件
working-directory: ./openwrt
run: |
make download -j$(nproc)
find dl -size -1024c -exec ls -l {} \;
find dl -size -1024c -exec rm -f {} \;
- name: 编译固件
working-directory: ./openwrt
run: |
echo -e "$(nproc) thread build."
make -j$(nproc) V=s
- name : 上传固件与目录
uses: actions/upload-artifact@master
with:
name: Lean_5.4
path: openwrt/bin