From 060fb899fa350210dba04128e6a0fd9f368f7fc0 Mon Sep 17 00:00:00 2001
From: klever1988 <56048681+klever1988@users.noreply.github.com>
Date: Sat, 14 Mar 2020 16:02:14 +0800
Subject: [PATCH] Update and rename r2s_lienol_from_lean.yml_ to
r2s_lienol_from_lean.yml
---
.github/workflows/r2s_lienol_from_lean.yml | 123 ++++++++++++++++++++
.github/workflows/r2s_lienol_from_lean.yml_ | 108 -----------------
2 files changed, 123 insertions(+), 108 deletions(-)
create mode 100644 .github/workflows/r2s_lienol_from_lean.yml
delete mode 100644 .github/workflows/r2s_lienol_from_lean.yml_
diff --git a/.github/workflows/r2s_lienol_from_lean.yml b/.github/workflows/r2s_lienol_from_lean.yml
new file mode 100644
index 0000000..4c6453f
--- /dev/null
+++ b/.github/workflows/r2s_lienol_from_lean.yml
@@ -0,0 +1,123 @@
+name: r2s Lienol版openwrt based on Lean
+
+on:
+ push:
+ paths:
+ - '.github/workflows/r2s_lienol_from_lean.yml'
+ schedule:
+ - cron: '30 12 * * *'
+
+jobs:
+
+ build:
+
+ runs-on: ubuntu-latest
+ if: github.event.repository.owner.id == 56048681
+
+ steps:
+
+ - name: Checkout
+ uses: actions/checkout@master
+ with:
+ ref: master
+
+ - name: Initialization Environment
+ env:
+ DEBIAN_FRONTEND: noninteractive
+ run: |
+ sudo rm -rf /etc/apt/sources.list.d
+ sudo apt-get update
+ sudo apt-get -y install bc build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler
+ wget -O - https://raw.githubusercontent.com/friendlyarm/build-env-on-ubuntu-bionic/master/install.sh | bash
+ sudo rm -rf /usr/share/dotnet /usr/local/lib/android/sdk
+
+ - name: Install Repo
+ run: |
+ git clone https://github.com/friendlyarm/repo
+ sudo cp repo/repo /usr/bin/
+
+ - name: Init Source
+ run: |
+ mkdir friendlywrt-rk3328
+ cd friendlywrt-rk3328
+ repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master-v19.07.1 -m rk3328.xml --repo-url=https://github.com/friendlyarm/repo --no-clone-bundle --depth=1
+ repo sync -c --no-tags --no-clone-bundle -j8
+ cd friendlywrt/ && git fetch --unshallow
+
+ - name: Patch Kernel
+ run: |
+ . patch_kernel_5.4.22.sh
+
+ - name: Mods
+ run: |
+ cd friendlywrt-rk3328
+ . ../remove_unused_config.sh
+ cat configs/config_rk3328 | grep "TARGET" >> ../base_rk3328.seed
+ cat ../app_config.seed >> ../base_rk3328.seed
+ cat ../base_rk3328.seed > configs/config_rk3328
+ echo '# CONFIG_V2RAY_COMPRESS_UPX is not set' >> configs/config_rk3328
+ cd friendlywrt
+ git config --local user.email "action@github.com" && git config --local user.name "GitHub Action"
+ git remote add upstream https://github.com/Lienol/openwrt && git fetch upstream
+ git rebase adc1a9a3676b8d7be1b48b5aed185a94d8e42728^ --onto upstream/dev-lean-lede -X theirs
+ git revert --no-edit f092ca098e80c667b10cdd1dba328506a2673c1d
+ git checkout upstream/dev-lean-lede -- feeds.conf.default
+ cd package/lean/
+ rm -rf luci-theme-argon
+ git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git
+ cd ../../
+ git apply ../../enable_autocore.diff
+ sed -i '/uci commit luci/i\uci set luci.main.mediaurlbase="/luci-static/argon"' package/lean/default-settings/files/zzz-default-settings
+ sed -i '/exit/i\chown -R root:root /usr/share/netdata/web' package/lean/default-settings/files/zzz-default-settings
+ sed -i 's/option fullcone\t1/option fullcone\t0/' package/network/config/firewall/files/firewall.config
+ sed -i '/exit/i\/etc/init.d/dockerd disabled' package/lean/default-settings/files/zzz-default-settings
+ sed -i '/8.8.8.8/d' package/base-files/files/root/setup.sh
+ echo -e '\nDYC Build\n' >> package/base-files/files/etc/banner
+
+ - name: Mod luci
+ run: |
+ cd friendlywrt-rk3328/friendlywrt
+ ./scripts/feeds update -a && ./scripts/feeds install -a
+ sed -i '/Load Average/i\
| <%:CPU Temperature%> | <%=luci.sys.exec("cut -c1-2 /sys/class/thermal/thermal_zone0/temp")%> |
' feeds/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
+ sed -i 's/pcdata(boardinfo.system or "?")/"ARMv8"/' feeds/luci/modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
+
+ - name: Build FriendlyWrt
+ run: |
+ cd friendlywrt-rk3328
+ sed -i 's/set -eu/set -u/' scripts/mk-friendlywrt.sh
+ ./build.sh nanopi_r2s.mk
+
+ - name: Zip Files
+ run: |
+ gzip friendlywrt-rk3328/out/*.img
+ - name: Assemble Artifact
+ id: assemble_artifact
+ run: |
+ rm -rf ./artifact/
+ mkdir -p ./artifact/
+ mv friendlywrt-rk3328/out/*img* ./artifact/
+ cp friendlywrt-rk3328/friendlywrt/.config ./artifact/
+ zip -r artifact.zip ./artifact/
+ release_tag="R2S-testcombined-$(date +%Y-%m-%d)"
+ echo "##[set-output name=release_tag;]$release_tag"
+ - name: Create Release
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.sec_token }}
+ with:
+ tag_name: ${{ steps.assemble_artifact.outputs.release_tag }}
+ release_name: 自动发布 ${{ steps.assemble_artifact.outputs.release_tag }}
+ draft: false
+ prerelease: false
+ - name: Upload Release Asset
+ id: upload-release-asset
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.sec_token }}
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
+ asset_path: ./artifact.zip
+ asset_name: ${{ steps.assemble_artifact.outputs.release_tag }}-ROM.zip
+ asset_content_type: application/zip
+
diff --git a/.github/workflows/r2s_lienol_from_lean.yml_ b/.github/workflows/r2s_lienol_from_lean.yml_
deleted file mode 100644
index 35250be..0000000
--- a/.github/workflows/r2s_lienol_from_lean.yml_
+++ /dev/null
@@ -1,108 +0,0 @@
-name: r2s Lienol版openwrt based on Lean
-
-on:
- push:
- paths:
- - '.github/workflows/r2s_lienol_from_lean.yml'
- schedule:
- - cron: '30 12 * * *'
-
-jobs:
-
- build:
-
- runs-on: ubuntu-latest
-
- steps:
-
- - name: Checkout
- uses: actions/checkout@master
- with:
- ref: master
-
- - name: Initialization Environment
- env:
- DEBIAN_FRONTEND: noninteractive
- run: |
- sudo rm -rf /etc/apt/sources.list.d
- sudo apt-get update
- sudo apt-get -y install bc build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler
- wget -O - https://raw.githubusercontent.com/friendlyarm/build-env-on-ubuntu-bionic/master/install.sh | bash
- sudo rm -rf /usr/share/dotnet /usr/local/lib/android/sdk
-
- - name: Install Repo
- run: |
- git clone https://github.com/friendlyarm/repo
- sudo cp repo/repo /usr/bin/
-
- - name: Init Source
- run: |
- mkdir friendlywrt-rk3328
- cd friendlywrt-rk3328
- repo init -u https://github.com/friendlyarm/friendlywrt_manifests -b master -m rk3328.xml --repo-url=https://github.com/friendlyarm/repo --no-clone-bundle
- cp ../rk3328-19.xml .repo/manifests/rk3328.xml
- repo sync -c --no-clone-bundle
- rm -rf friendlywrt/
- git clone https://github.com/friendlyarm/friendlywrt
-
- - name: Mods
- run: |
- cd friendlywrt-rk3328
- . ../remove_used_config.sh
- sed -i '/samba/d;/SAMBA/d' configs/config_rk3328
- echo '
- CONFIG_OPENSSL_ENGINE_BUILTIN=y
- CONFIG_PACKAGE_collectd=y
- CONFIG_PACKAGE_collectd-mod-thermal=y
- CONFIG_PACKAGE_curl=y
- CONFIG_PACKAGE_dnsmasq_full_dhcpv6=y
- CONFIG_PACKAGE_ipv6helper=y
- CONFIG_PACKAGE_luci-app-cifsd=y
- CONFIG_PACKAGE_luci-app-mwan3=y
- CONFIG_PACKAGE_luci-app-netdata=y
- CONFIG_PACKAGE_luci-app-statistics=y
- CONFIG_PACKAGE_luci-app-syncdial=y
- CONFIG_PACKAGE_luci-app-ttyd=y
- CONFIG_PACKAGE_luci-app-unblockneteasemusic-mini=y
- CONFIG_PACKAGE_luci-theme-argon-dark-mod=y
- CONFIG_PACKAGE_luci-theme-argon-light-mod=y
- CONFIG_PACKAGE_luci-theme-material=y
- # CONFIG_OPENSSL_ENGINE_BUILTIN_DEVCRYPTO is not set
- # CONFIG_PACKAGE_libopenssl-devcrypto is not set
- # CONFIG_PACKAGE_kmod-crypto-authenc is not set
- # CONFIG_PACKAGE_kmod-cryptodev is not set' >> configs/config_rk3328
- cd friendlywrt
- git config --local user.email "action@github.com" && git config --local user.name "GitHub Action"
- git remote add upstream https://github.com/Lienol/openwrt && git fetch upstream
- git rebase 90bb1cf9c33e73de5019686b8bd495f689e675a4^ --onto upstream/dev-lean-lede -X theirs
- git checkout upstream/dev-lean-lede -- feeds.conf.default
- sed -i '/upx/d' tools/Makefile
- sed -i '/exit/i\chown -R root:root /usr/share/netdata/web' package/lean/default-settings/files/zzz-default-settings
- sed -i 's/option fullcone\t1/option fullcone\t0/' package/network/config/firewall/files/firewall.config
- sed -i '/8.8.8.8/d' package/base-files/files/root/setup.sh
-
- - name: Clean Feeds
- run: |
- cd friendlywrt-rk3328/friendlywrt
- ./scripts/feeds clean -a
-
- - name: Build FriendlyWrt
- run: |
- cd friendlywrt-rk3328
- sed -i 's/set -eu/set -u/' scripts/mk-friendlywrt.sh
- ./build.sh nanopi_r2s.mk
-
- - name: Zip Files
- run: |
- gzip friendlywrt-rk3328/out/*.img
- - name: Assemble Artifact
- run: |
- rm -rf ./artifact/
- mkdir -p ./artifact/
- mv friendlywrt-rk3328/out/*img* ./artifact/
- cp friendlywrt-rk3328/friendlywrt/.config ./artifact/
- - name: Upload Artifact
- uses: actions/upload-artifact@master
- with:
- name: FriendlyWrt_NanoPi-R2S
- path: ./artifact/