Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
DHDAXCW committed Nov 8, 2023
1 parent 7c2b758 commit e2b0b06
Show file tree
Hide file tree
Showing 8 changed files with 171 additions and 197 deletions.
72 changes: 28 additions & 44 deletions .github/workflows/beggar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Blog: https://p3terx.com
#=================================================

name: NanoPi-R4S-乞丐
name: GL.iNet_GL-MT6000_lede-乞丐版

on:
repository_dispatch:
Expand All @@ -17,9 +17,9 @@ on:
# types: started

env:
REPO_URL: https://github.com/DHDAXCW/lede-rockchip
REPO_BRANCH: stable
CONFIG_FILE: configs/lean/lean_beggar.config
REPO_URL: git@github.com:DHDAXCW/GL.iNet_GL-MT6000.git
REPO_BRANCH: master
CONFIG_FILE: configs/lean/lean-beggar.config
DIY_SH: scripts/lean.sh
KMODS_IN_FIRMWARE: true
UPLOAD_RELEASE: true
Expand All @@ -40,6 +40,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Initialization Environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
echo -e "Total CPU cores\t: $(nproc)"
cat /proc/cpuinfo | grep 'model name'
free -h
uname -a
[ -f /proc/version ] && cat /proc/version
[ -f /etc/issue.net ] && cat /etc/issue.net
[ -f /etc/issue ] && cat /etc/issue
ulimit -a
- name: Clone Source Code
run: |
df -hT $PWD
Expand All @@ -53,11 +66,11 @@ jobs:
echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV
echo "OPENWRTROOT=$PWD" >> $GITHUB_OUTPUT
mkdir customfeeds
git clone --depth=1 https://github.com/DHDAXCW/packages customfeeds/packages
git clone --depth=1 https://github.com/DHDAXCW/luci customfeeds/luci
git clone --depth=1 https://github.com/coolsnowwolf/packages customfeeds/packages
git clone --depth=1 https://github.com/coolsnowwolf/luci customfeeds/luci
chmod +x ../scripts/*.sh
../scripts/hook-feeds.sh
- name: Install Feeds
run: |
cd $OPENWRTROOT
Expand Down Expand Up @@ -114,42 +127,17 @@ jobs:
if: steps.compile.outputs.COMPILE_STATUS == 'success'
id: generate
run: |
cd configs/opkg
sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf
sed -i "s/target\//$TARGET\//g" distfeeds*.conf
sed -i "s/platform/$PLATFORM/g" distfeeds*.conf
cd $OPENWRTROOT
mkdir -p files/etc/uci-defaults/
cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings
mkdir -p files/etc/opkg
cp ../configs/opkg/distfeeds-packages-server.conf files/etc/opkg/distfeeds.conf.server
mkdir -p files/etc/opkg/keys
cp ../configs/opkg/1035ac73cc4e59e3 files/etc/opkg/keys/1035ac73cc4e59e3
if "$KMODS_IN_FIRMWARE" = 'true'
then
mkdir -p files/www/snapshots
cp -r bin/targets files/www/snapshots
cp ../configs/opkg/distfeeds-18.06-local.conf files/etc/opkg/distfeeds.conf
else
cp ../configs/opkg/distfeeds-18.06-remote.conf files/etc/opkg/distfeeds.conf
fi
cp files/etc/opkg/distfeeds.conf.server files/etc/opkg/distfeeds.conf.mirror
sed -i "s/http:\/\/192.168.123.100:2345\/snapshots/https:\/\/openwrt.cc\/snapshots\/$(date +"%Y-%m-%d")\/lean/g" files/etc/opkg/distfeeds.conf.mirror
make package/install -j$(nproc) || make package/install -j1 V=s
make target/install -j$(nproc) || make target/install -j1 V=s
pushd bin/targets/rockchip/armv8
#rm -rf **ext4**
rm -rf openwrt-rockchip-armv8.manifest
rm -rf openwrt-rockchip-armv8-rootfs.tar.gz
rm -rf config.buildinfo
rm -rf packages-server.zip
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz beggar-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r4se-ext4-sysupgrade.img.gz beggar-friendlyarm_nanopi-r4se-ext4-sysupgrade.img.gz
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img.gz beggar-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img.gz
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r4se-squashfs-sysupgrade.img.gz beggar-friendlyarm_nanopi-r4se-squashfs-sysupgrade.img.gz
pushd bin/targets/mediatek/filogic
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000-preloader.bin
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000.manifest
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000-initramfs-kernel.bin
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000-bl31-uboot.fip
mv openwrt-mediatek-filogic-glinet_gl-mt6000-squashfs-sysupgrade.bin $(date +"%Y.%m.%d")-beggar-openwrt-mediatek-filogic-glinet_gl-mt6000-squashfs-sysupgrade.bin
popd
make checksum
mv bin/targets/rockchip/armv8/sha256sums bin/targets/rockchip/armv8/beggar-sha256sums
echo "GENERATE_STATUS=success" >> $GITHUB_OUTPUT
- name: Generate release tag
Expand All @@ -159,11 +147,7 @@ jobs:
echo "release_tag=$(date +"%Y.%m.%d")-Lean1" >> $GITHUB_OUTPUT
echo "release_date=$(date +"%Y.%m.%d")" >> $GITHUB_OUTPUT
touch release.txt
echo "后台地址:192.168.11.1
full = 全插件
docker = 带docker
slim = 精简版
beggar = 乞丐版" >> release.txt
echo "后台地址:192.168.11.1"
echo "status=success" >> $GITHUB_OUTPUT
- name: Upload firmware to release
Expand All @@ -172,7 +156,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ steps.tag.outputs.release_date }} NanoPi-R4S-R4SE-linux.5.4_固件下载
name: ${{ steps.tag.outputs.release_date }} GL.iNet_GL-MT6000_lede.linux_5.15_固件下载
tag_name: ${{ steps.tag.outputs.release_tag }}
body_path: release.txt
files: ${{ env.FIRMWARE }}/*
Expand Down
80 changes: 32 additions & 48 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Blog: https://p3terx.com
#=================================================

name: NanoPi-R4S-容器
name: GL.iNet_GL-MT6000_lede-容器版

on:
repository_dispatch:
Expand All @@ -17,9 +17,9 @@ on:
# types: started

env:
REPO_URL: https://github.com/DHDAXCW/lede-rockchip
REPO_BRANCH: stable
CONFIG_FILE: configs/lean/lean_docker.config
REPO_URL: git@github.com:DHDAXCW/GL.iNet_GL-MT6000.git
REPO_BRANCH: master
CONFIG_FILE: configs/lean/lean-docker.config
DIY_SH: scripts/lean.sh
KMODS_IN_FIRMWARE: true
UPLOAD_RELEASE: true
Expand All @@ -40,6 +40,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Initialization Environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
echo -e "Total CPU cores\t: $(nproc)"
cat /proc/cpuinfo | grep 'model name'
free -h
uname -a
[ -f /proc/version ] && cat /proc/version
[ -f /etc/issue.net ] && cat /etc/issue.net
[ -f /etc/issue ] && cat /etc/issue
ulimit -a
- name: Clone Source Code
run: |
df -hT $PWD
Expand All @@ -53,15 +66,16 @@ jobs:
echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV
echo "OPENWRTROOT=$PWD" >> $GITHUB_OUTPUT
mkdir customfeeds
git clone --depth=1 https://github.com/DHDAXCW/packages customfeeds/packages
git clone --depth=1 https://github.com/DHDAXCW/luci customfeeds/luci
git clone --depth=1 https://github.com/coolsnowwolf/packages customfeeds/packages
git clone --depth=1 https://github.com/coolsnowwolf/luci customfeeds/luci
chmod +x ../scripts/*.sh
../scripts/hook-feeds.sh
- name: Install Feeds
run: |
cd $OPENWRTROOT
./scripts/feeds install -a
- name: Load Custom Configuration
run: |
[ -e files ] && mv files $OPENWRTROOT/files
Expand All @@ -72,7 +86,7 @@ jobs:
../scripts/preset-clash-core.sh arm64
../scripts/preset-terminal-tools.sh
make defconfig
- name: Download Package
id: package
run: |
Expand Down Expand Up @@ -108,48 +122,23 @@ jobs:
echo "FIRMWARE=$PWD" >> $GITHUB_ENV
echo "FIRMWARE=$PWD" >> $GITHUB_OUTPUT
echo "COMPILE_STATUS=success" >> $GITHUB_OUTPUT
- name: Generate Firmware
if: steps.compile.outputs.COMPILE_STATUS == 'success'
id: generate
run: |
cd configs/opkg
sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf
sed -i "s/target\//$TARGET\//g" distfeeds*.conf
sed -i "s/platform/$PLATFORM/g" distfeeds*.conf
cd $OPENWRTROOT
mkdir -p files/etc/uci-defaults/
cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings
mkdir -p files/etc/opkg
cp ../configs/opkg/distfeeds-packages-server.conf files/etc/opkg/distfeeds.conf.server
mkdir -p files/etc/opkg/keys
cp ../configs/opkg/1035ac73cc4e59e3 files/etc/opkg/keys/1035ac73cc4e59e3
if "$KMODS_IN_FIRMWARE" = 'true'
then
mkdir -p files/www/snapshots
cp -r bin/targets files/www/snapshots
cp ../configs/opkg/distfeeds-18.06-local.conf files/etc/opkg/distfeeds.conf
else
cp ../configs/opkg/distfeeds-18.06-remote.conf files/etc/opkg/distfeeds.conf
fi
cp files/etc/opkg/distfeeds.conf.server files/etc/opkg/distfeeds.conf.mirror
sed -i "s/http:\/\/192.168.123.100:2345\/snapshots/https:\/\/openwrt.cc\/snapshots\/$(date +"%Y-%m-%d")\/lean/g" files/etc/opkg/distfeeds.conf.mirror
make package/install -j$(nproc) || make package/install -j1 V=s
make target/install -j$(nproc) || make target/install -j1 V=s
pushd bin/targets/rockchip/armv8
#rm -rf **ext4**
rm -rf openwrt-rockchip-armv8.manifest
rm -rf openwrt-rockchip-armv8-rootfs.tar.gz
rm -rf config.buildinfo
rm -rf packages-server.zip
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz docker-friendlyarm_nanopi-r4s-ext4-sysupgrade.img.gz
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r4se-ext4-sysupgrade.img.gz docker-friendlyarm_nanopi-r4se-ext4-sysupgrade.img.gz
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img.gz docker-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img.gz
mv openwrt-rockchip-armv8-friendlyarm_nanopi-r4se-squashfs-sysupgrade.img.gz docker-friendlyarm_nanopi-r4se-squashfs-sysupgrade.img.gz
pushd bin/targets/mediatek/filogic
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000-preloader.bin
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000.manifest
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000-initramfs-kernel.bin
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000-bl31-uboot.fip
mv openwrt-mediatek-filogic-glinet_gl-mt6000-squashfs-sysupgrade.bin $(date +"%Y.%m.%d")-docker-openwrt-mediatek-filogic-glinet_gl-mt6000-squashfs-sysupgrade.bin
popd
make checksum
mv bin/targets/rockchip/armv8/sha256sums bin/targets/rockchip/armv8/docker-sha256sums
echo "GENERATE_STATUS=success" >> $GITHUB_OUTPUT
echo "GENERATE_STATUS=success" >> $GITHUB_OUTPUT
- name: Generate release tag
id: tag
Expand All @@ -158,11 +147,7 @@ jobs:
echo "release_tag=$(date +"%Y.%m.%d")-Lean1" >> $GITHUB_OUTPUT
echo "release_date=$(date +"%Y.%m.%d")" >> $GITHUB_OUTPUT
touch release.txt
echo "后台地址:192.168.11.1
full = 全插件
docker = 带docker
slim = 精简版
beggar = 乞丐版" >> release.txt
echo "后台地址:192.168.11.1"
echo "status=success" >> $GITHUB_OUTPUT
- name: Upload firmware to release
Expand All @@ -171,7 +156,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ steps.tag.outputs.release_date }} NanoPi-R4S-R4SE-linux.5.4_固件下载
name: ${{ steps.tag.outputs.release_date }} GL.iNet_GL-MT6000_lede.linux_5.15_固件下载
tag_name: ${{ steps.tag.outputs.release_tag }}
body_path: release.txt
files: ${{ env.FIRMWARE }}/*
Expand All @@ -196,4 +181,3 @@ jobs:
with:
name: |
bin-archive
3 changes: 3 additions & 0 deletions .github/workflows/full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ jobs:
pushd bin/targets/mediatek/filogic
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000-preloader.bin
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000.manifest
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000-initramfs-kernel.bin
rm -rf openwrt-mediatek-filogic-glinet_gl-mt6000-bl31-uboot.fip
mv openwrt-mediatek-filogic-glinet_gl-mt6000-squashfs-sysupgrade.bin $(date +"%Y.%m.%d")-full-openwrt-mediatek-filogic-glinet_gl-mt6000-squashfs-sysupgrade.bin
popd
make checksum
echo "GENERATE_STATUS=success" >> $GITHUB_OUTPUT
Expand Down
Loading

0 comments on commit e2b0b06

Please sign in to comment.