Skip to content

Commit 1f8a69e

Browse files
ai fix
1 parent 6b92ed0 commit 1f8a69e

File tree

1 file changed

+41
-52
lines changed

1 file changed

+41
-52
lines changed

.github/workflows/build_image_all.yml

Lines changed: 41 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
name: BuildImage-all
2-
on:
2+
on:
33
workflow_dispatch:
44
push:
5+
branches:
6+
- master
57
schedule:
68
- cron: "0 21 * * *"
79

@@ -31,8 +33,6 @@ jobs:
3133

3234
- name: Checkout
3335
uses: actions/checkout@v4
34-
with:
35-
fetch-depth: 0
3636

3737
- name: modify docker path
3838
run: |
@@ -52,7 +52,8 @@ jobs:
5252
- uses: actions/upload-artifact@v4
5353
with:
5454
name: openclash-${{ matrix.arch }}-${{ matrix.version }}
55-
path: openclash
55+
path: openclash
56+
retention-days: 7
5657

5758
build_passwall:
5859
strategy:
@@ -72,12 +73,12 @@ jobs:
7273

7374
- name: Install golang
7475
run: |
75-
# VERSION=`curl -L https://golang.org/VERSION?m=text|awk 'NR==1{print $0}'`
76-
VERSION="go1.20.3"
77-
wget https://go.dev/dl/$VERSION.linux-amd64.tar.gz
76+
VERSION=$(curl -sL https://go.dev/VERSION?m=text | head -1)
77+
echo "Installing Go version: $VERSION"
78+
wget -q https://go.dev/dl/$VERSION.linux-amd64.tar.gz
7879
rm -rf /usr/local/go
7980
tar -C /usr/local -xzf $VERSION.linux-amd64.tar.gz
80-
rm -rf $VERSION.linux-amd64.tar.gz
81+
rm -f $VERSION.linux-amd64.tar.gz
8182
export GOROOT=/usr/local/go
8283
export PATH=$PATH:/usr/local/go/bin
8384
go version
@@ -89,45 +90,37 @@ jobs:
8990
export BUILDER="buildbot"
9091
export GOROOT=/usr/local/go
9192
export PATH=$PATH:/usr/local/go/bin
92-
cd $BUILD_DIR
93+
cd $BUILD_DIR
9394
apt-get update
94-
apt install sudo -y
95+
apt install sudo tree -y
9596
sudo -u $BUILDER echo "src-git passwall https://github.com/xiaorouji/openwrt-passwall.git;main" >> "feeds.conf.default"
9697
sudo -u $BUILDER echo "src-git passwall_packages https://github.com/xiaorouji/openwrt-passwall-packages.git;main" >> "feeds.conf.default"
97-
chown -R $BUILDER:$BUILDER $BUILD_DIR
98+
chown -R $BUILDER:$BUILDER $BUILD_DIR
9899
while ! sudo -u $BUILDER ./scripts/feeds update -a; do echo "Try again"; done
99100
sudo -u $BUILDER ./scripts/feeds install luci-app-passwall
100101
sudo -u $BUILDER make defconfig
101102
### enable all passwall packages
102-
# sudo -u $BUILDER sed -i "s/# \(CONFIG_PACKAGE_luci-app-passwall_.*\) is not set/\1=y/g" .config
103+
# sudo -u $BUILDER sed -i "s/# \(CONFIG_PACKAGE_luci-app-passwall_.*\) is not set/\1=y/g" .config
103104
### disable singbox
104105
# sudo -u $BUILDER sed -i '/CONFIG_PACKAGE_luci-app-passwall_INCLUDE_SingBox=y/ s/=y/=n/' .config
105106
### disable v2ray-plugin
106107
# sudo -u $BUILDER sed -i '/CONFIG_PACKAGE_luci-app-passwall_INCLUDE_V2ray_Plugin=y/ s/=y/=n/' .config
107108
### set golang external bootstrap root
108109
# sed -i 's|CONFIG_GOLANG_EXTERNAL_BOOTSTRAP_ROOT=""|CONFIG_GOLANG_EXTERNAL_BOOTSTRAP_ROOT="/usr/local/go"|' .config
109-
sudo -u $BUILDER make package/luci-app-passwall/compile V=99 -j1 || cat logs/feeds/passwall/luci-app-passwall/dump.txt
110+
sudo -u $BUILDER make package/luci-app-passwall/compile V=99 -j1 || cat logs/feeds/passwall/luci-app-passwall/dump.txt
110111
mkdir -p $VOLUME_HOME/passwall
111112
cp -r bin/packages/*/passwall/* $VOLUME_HOME/passwall
112-
cp -r bin/packages/*/passwall_packages/* $VOLUME_HOME/passwall
113+
cp -r bin/packages/*/passwall_packages/* $VOLUME_HOME/passwall
113114
### do not copy all packages, just copy passwall and passwall_packages
114-
# cp -r bin/packages/*/packages/* $VOLUME_HOME/passwall
115+
# cp -r bin/packages/*/packages/* $VOLUME_HOME/passwall
115116
# cp -r bin/packages $VOLUME_HOME/passwall
117+
tree bin/packages
116118
117-
- name: Debug Print
118-
run: |
119-
export VOLUME_HOME=$(pwd)
120-
export BUILD_DIR="/builder"
121-
export BUILDER="buildbot"
122-
export PATH=$PATH:/usr/local/go/bin
123-
cd $BUILD_DIR
124-
apt-get update
125-
apt install tree -y
126-
tree bin/packages
127119
- uses: actions/upload-artifact@v4
128120
with:
129121
name: passwall-${{ matrix.arch }}-${{ matrix.version }}
130-
path: passwall
122+
path: passwall
123+
retention-days: 7
131124

132125
build_theme_argon:
133126
strategy:
@@ -169,10 +162,12 @@ jobs:
169162
- uses: actions/upload-artifact@v4
170163
with:
171164
name: luci-theme-argon-${{ matrix.arch }}-${{ matrix.version }}
172-
path: luci-theme-argon
165+
path: luci-theme-argon
166+
retention-days: 7
173167

174168
# luci app netdata has some bugs, so just not use it for now!
175169
build_luci_app_netdata:
170+
if: false # Disabled due to bugs
176171
strategy:
177172
fail-fast: false
178173
matrix:
@@ -213,7 +208,8 @@ jobs:
213208
- uses: actions/upload-artifact@v4
214209
with:
215210
name: luci-app-netdata-${{ matrix.arch }}-${{ matrix.version }}
216-
path: luci-app-netdata
211+
path: luci-app-netdata
212+
retention-days: 7
217213

218214
build_image:
219215
strategy:
@@ -222,7 +218,7 @@ jobs:
222218
version: [24.10.5, 25.12.0-rc2]
223219
arch: [x86-64, rockchip-armv8]
224220
if: ${{ always() }}
225-
needs: [build_passwall, build_theme_argon, build_luci_app_netdata, build_openclash]
221+
needs: [build_passwall, build_theme_argon, build_openclash]
226222
name: Build Image for OpenWRT-${{ matrix.arch }}-${{ matrix.version }}
227223
runs-on: ubuntu-latest
228224
# container:
@@ -245,8 +241,6 @@ jobs:
245241

246242
- name: Checkout
247243
uses: actions/checkout@v4
248-
with:
249-
fetch-depth: 0
250244

251245
- uses: actions/download-artifact@v4
252246
with:
@@ -259,7 +253,7 @@ jobs:
259253
name: openclash-${{ matrix.arch }}-${{ matrix.version }}
260254
# - uses: actions/download-artifact@v4
261255
# with:
262-
# name: luci-app-netdata
256+
# name: luci-app-netdata-${{ matrix.arch }}-${{ matrix.version }}
263257

264258
- name: modify docker path
265259
run: |
@@ -280,9 +274,9 @@ jobs:
280274
281275
- name: Set profile
282276
run: |
283-
if ${{ matrix.arch == 'x86-64' }}; then
277+
if [[ "${{ matrix.arch }}" == "x86-64" ]]; then
284278
echo "profile=generic" >> $GITHUB_ENV
285-
elif ${{ matrix.arch == 'rockchip-armv8' }}; then
279+
elif [[ "${{ matrix.arch }}" == "rockchip-armv8" ]]; then
286280
echo "profile=friendlyarm_nanopi-r2s" >> $GITHUB_ENV
287281
fi
288282
- name: Make Image
@@ -307,23 +301,18 @@ jobs:
307301
env:
308302
rootfs_size: 4096
309303
kernel_size: 256
310-
packages: luci luci-app-qos luci-app-upnp luci-proto-ipv6 kmod-igc kmod-mt7921e
311-
luci-i18n-base-zh-cn netdata luci-app-ttyd pciutils
312-
coreutils-timeout lm-sensors lm-sensors-detect fdisk shadow-useradd -dnsmasq
313-
vim python3 sudo ipset samba4-server
314-
openvpn-openssl luci-app-openvpn lsof kmod-usb-storage block-mount lsblk luci-app-samba4
315-
tcpdump zstd tmux bash netcat ip6tables-mod-nat iptables-mod-tproxy dnsmasq-full hostapd
316-
wpa-supplicant xl2tpd kmod-loop nfs-kernel-server iptables-mod-socket
317-
iptables-mod-iprange kmod-nft-socket kmod-nft-tproxy kmod-nft-nat
318-
wireguard-tools kmod-wireguard luci-proto-wireguard
319-
# docker dockerd docker-compose tailscale mwan3 luci-app-mwan3
320-
# luci-theme-argon ntpclient luci-app-ntpc
321-
# chinadns-ng dns2socks dns2tcp luci-app-passwall luci-i18n-passwall-zh-cn microsocks
322-
# shadowsocksr-libev-ssr-check shadowsocksr-libev-ssr-local shadowsocksr-libev-ssr-nat
323-
# shadowsocksr-libev-ssr-redir shadowsocksr-libev-ssr-server simple-obfs-server simple-obfs
324-
# tcping trojan-plus v2ray-core v2ray-example v2ray-extra v2ray-plugin
325-
# open-vm-tools
304+
packages: >-
305+
luci luci-app-qos luci-app-upnp luci-proto-ipv6 kmod-igc kmod-mt7921e
306+
luci-i18n-base-zh-cn netdata luci-app-ttyd pciutils
307+
coreutils-timeout lm-sensors lm-sensors-detect fdisk shadow-useradd -dnsmasq
308+
vim python3 sudo ipset samba4-server
309+
openvpn-openssl luci-app-openvpn lsof kmod-usb-storage block-mount lsblk luci-app-samba4
310+
tcpdump zstd tmux bash netcat ip6tables-mod-nat iptables-mod-tproxy dnsmasq-full hostapd
311+
wpa-supplicant xl2tpd kmod-loop nfs-kernel-server iptables-mod-socket
312+
iptables-mod-iprange kmod-nft-socket kmod-nft-tproxy kmod-nft-nat
313+
wireguard-tools kmod-wireguard luci-proto-wireguard
326314
- uses: actions/upload-artifact@v4
327315
with:
328-
name: openwrt-${{ matrix.arch }}-${{ matrix.version }}
329-
path: openwrt_output
316+
name: openwrt-${{ matrix.arch }}-${{ matrix.version }}
317+
path: openwrt_output
318+
retention-days: 30

0 commit comments

Comments
 (0)