mirror of
https://github.com/roacn/openwrt-packages.git
synced 2025-01-07 03:16:45 +08:00
remove svn
This commit is contained in:
parent
b91c623462
commit
06d41d2a74
452
.github/workflows/sync_lede.yml
vendored
452
.github/workflows/sync_lede.yml
vendored
@ -1,210 +1,242 @@
|
||||
#
|
||||
# This is free software, lisence use MIT.
|
||||
#
|
||||
|
||||
name: Merge-Upstream-Lede
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- Lede
|
||||
paths:
|
||||
- '.github/workflows/sync_lede.yml'
|
||||
- '.gitignore'
|
||||
- '.github/diy/**'
|
||||
schedule:
|
||||
- cron: 5 */8 * * *
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ssh:
|
||||
description: '开启SSH远程配置'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
env:
|
||||
BRANCH: Lede
|
||||
|
||||
jobs:
|
||||
merge:
|
||||
if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id
|
||||
runs-on: Ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Check inputs
|
||||
run: |
|
||||
echo github.ref is: ${{ github.ref }}
|
||||
echo github.event_name is: ${{ github.event_name }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.BRANCH }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set git identity
|
||||
run : |
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
sudo timedatectl set-timezone "Asia/Shanghai"
|
||||
|
||||
- name: Syn upstream
|
||||
run: |
|
||||
shopt -s extglob
|
||||
set +e
|
||||
git rm -r --cached * >/dev/null 2>&1 &
|
||||
rm -rf `find ./* -maxdepth 0 -type d ! -name ".github/diy"` >/dev/null 2>&1
|
||||
|
||||
function git_clone() {
|
||||
git clone --depth 1 $1 $2
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $1"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
}
|
||||
|
||||
function git_branch_clone() {
|
||||
git clone --depth 1 -b $1 $2 $3
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $2"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
}
|
||||
|
||||
function git_sparse_clone() {
|
||||
branch="$1" rurl="$2" localdir="$3" && shift 3
|
||||
git clone -b $branch --depth 1 --filter=blob:none --sparse $rurl $localdir
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $rurl"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
cd $localdir
|
||||
git sparse-checkout init --cone
|
||||
git sparse-checkout set $@
|
||||
mv -n $@ ../ || true
|
||||
cd ..
|
||||
rm -rf $localdir
|
||||
}
|
||||
|
||||
function git_sparse_clone2() {
|
||||
commitid="$1" rurl="$2" localdir="$3" && shift 3
|
||||
git clone --filter=blob:none --sparse $rurl $localdir
|
||||
cd $localdir
|
||||
git checkout $commitid
|
||||
git sparse-checkout init --cone
|
||||
git sparse-checkout set $@
|
||||
mv -n $@ ../ || true
|
||||
cd ..
|
||||
rm -rf $localdir
|
||||
}
|
||||
|
||||
function mvdir() {
|
||||
mv -n `find $1/* -maxdepth 0 -type d` ./
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
function mvdir_force() {
|
||||
mv -f `find $1/* -maxdepth 0 -type d` ./
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
git_clone https://github.com/sirpdboy/luci-app-advanced
|
||||
git_clone https://github.com/honwen/luci-app-aliddns
|
||||
git_clone https://github.com/sbwml/luci-app-alist sbwmlalist
|
||||
svn export https://github.com/messense/aliyundrive-webdav/trunk/openwrt && mvdir openwrt
|
||||
git_clone https://github.com/roacn/luci-app-autoupdate
|
||||
git_clone https://github.com/sirpdboy/luci-app-autotimeset
|
||||
git_clone https://github.com/NateLol/luci-app-beardropper
|
||||
git_clone https://github.com/mingxiaoyu/luci-app-cloudflarespeedtest.git cloudflarespeedtest
|
||||
svn export https://github.com/immortalwrt-collections/openwrt-cdnspeedtest/trunk/cdnspeedtest
|
||||
git_clone https://github.com/sirpdboy/luci-app-ddns-go
|
||||
svn export https://github.com/lisaac/luci-app-dockerman/trunk/applications/luci-app-dockerman
|
||||
git_clone https://github.com/sirpdboy/luci-app-eqosplus
|
||||
git_clone https://github.com/sbwml/luci-app-mosdns mos
|
||||
git_clone https://github.com/sirpdboy/luci-app-netdata
|
||||
svn export https://github.com/sirpdboy/netspeedtest/trunk/luci-app-netspeedtest
|
||||
svn export https://github.com/sirpdboy/netspeedtest/trunk/homebox
|
||||
git_clone https://github.com/rufengsuixing/luci-app-onliner
|
||||
svn export https://github.com/vernesong/OpenClash/trunk/luci-app-openclash
|
||||
git_clone https://github.com/sirpdboy/luci-app-parentcontrol
|
||||
git_clone https://github.com/sirpdboy/luci-app-partexp
|
||||
git_clone https://github.com/esirplayground/luci-app-poweroff
|
||||
git_clone https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
git_clone https://github.com/zzsj0928/luci-app-pushbot
|
||||
#git_clone https://github.com/sbwml/luci-app-qbittorrent sbwml_qbittorrent && mvdir sbwml_qbittorrent
|
||||
git_clone https://github.com/DevOpenWRT-Router/luci-app-rebootschedule
|
||||
svn export https://github.com/doushang/luci-app-shortcutmenu/trunk/luci-app-shortcutmenu
|
||||
git_branch_clone lede https://github.com/pymumu/luci-app-smartdns
|
||||
git_clone https://github.com/pymumu/openwrt-smartdns smartdns
|
||||
svn export https://github.com/Tencent-Cloud-Plugins/tencentcloud-openwrt-plugin-ddns/trunk/tencentcloud_ddns luci-app-tencentddns
|
||||
svn export https://github.com/Tencent-Cloud-Plugins/tencentcloud-openwrt-plugin-cos/trunk/tencentcloud_cos luci-app-tencentcloud-cos
|
||||
git_branch_clone master https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
|
||||
svn export https://github.com/coolsnowwolf/gargoyle/trunk/package/addon/lean/vsftpd-alt
|
||||
git_branch_clone openwrt-18.06 https://github.com/tty228/luci-app-wechatpush
|
||||
git_clone https://github.com/walkingsky/luci-wifidog luci-app-wifidog
|
||||
|
||||
git_clone https://github.com/xiaorouji/openwrt-passwall-packages && mvdir_force openwrt-passwall-packages
|
||||
svn export https://github.com/xiaorouji/openwrt-passwall/trunk/luci-app-passwall
|
||||
svn export https://github.com/xiaorouji/openwrt-passwall2/trunk/luci-app-passwall2
|
||||
git_branch_clone main https://github.com/fw876/helloworld && mvdir helloworld
|
||||
|
||||
svn export https://github.com/linkease/nas-packages-luci/trunk/luci ./linkease/nas/luci && mv -n ./linkease/nas/luci/* ./linkease && rm -rf ./linkease/nas
|
||||
svn export https://github.com/linkease/nas-packages/trunk/network/services ./linkease/nas/network/services && mv -n ./linkease/nas/network/services/* ./linkease && rm -rf ./linkease/nas
|
||||
svn export https://github.com/linkease/nas-packages/trunk/multimedia/ffmpeg-remux ./linkease/nas/multimedia/ffmpeg-remux && mv -n ./linkease/nas/multimedia/* ./linkease && rm -rf ./linkease/nas
|
||||
svn export https://github.com/linkease/istore/trunk/luci ./linkease/iStore/luci && mv -n ./linkease/iStore/luci/* ./linkease && rm -rf ./linkease/iStore
|
||||
svn export https://github.com/linkease/istore/trunk/translations ./linkease/translations
|
||||
|
||||
git_clone https://github.com/openwrt-develop/luci-theme-atmaterial
|
||||
git_clone https://github.com/sirpdboy/luci-theme-btmod
|
||||
git_clone https://github.com/netitgo/luci-theme-jj
|
||||
git_clone https://github.com/thinktip/luci-theme-neobird
|
||||
git_clone https://github.com/sirpdboy/luci-theme-opentopd
|
||||
git_branch_clone 18.06 https://github.com/jerrykuku/luci-theme-argon
|
||||
git_branch_clone 18.06 https://github.com/jerrykuku/luci-app-argon-config
|
||||
svn export https://github.com/Aslin-Ameng/luci-theme-Light/trunk/luci-theme-Light
|
||||
|
||||
- name: Delete duplicated packages
|
||||
continue-on-error: true
|
||||
run: |
|
||||
shopt -s extglob
|
||||
mv -n cloudflarespeedtest/applications/luci-app-cloudflarespeedtest luci-app-cloudflarespeedtest ; rm -rf cloudflarespeedtest
|
||||
mv -f sbwmlalist/luci-app-alist luci-app-alist && mv -f sbwmlalist/alist alist ; rm -rf sbwmlalist
|
||||
rm -rf mosdns && mv -f mos/luci-app-mosdns luci-app-mosdns && mv -f mos/mosdns mosdns && mv -f mos/v2dat v2dat ; rm -rf mos
|
||||
cp -rf .github/diy/packages/* ./ || true
|
||||
rm -rf */.git
|
||||
|
||||
- name: Apply patches
|
||||
continue-on-error: true
|
||||
run: |
|
||||
find ".github/diy/patches" -type f -name '*.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -p1 -E --forward --no-backup-if-mismatch"
|
||||
|
||||
- name: Modify
|
||||
continue-on-error: true
|
||||
run: |
|
||||
bash .github/diy/create_acl_for_luci.sh -a >/dev/null 2>&1 || true
|
||||
bash .github/diy/convert_translation.sh -a >/dev/null 2>&1 || true
|
||||
|
||||
- name: SSH connection to Actions
|
||||
uses: kiddin9/debugger-action@master
|
||||
if: github.event.inputs.ssh == 'true'
|
||||
|
||||
- name: Apply
|
||||
continue-on-error: true
|
||||
run: |
|
||||
Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "💋" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤")
|
||||
git add .
|
||||
if [ -n "$(git status -s)" ]; then
|
||||
git commit -m "${Emoji[$[$RANDOM % ${#Emoji[@]}]]} Sync $(date +%Y-%m-%d" "%H:%M)"
|
||||
git push -f origin ${{ env.BRANCH }}
|
||||
fi
|
||||
|
||||
- name: Delete workflow runs
|
||||
uses: Mattraks/delete-workflow-runs@main
|
||||
continue-on-error: true
|
||||
with:
|
||||
retain_days: 0
|
||||
keep_minimum_runs: 2
|
||||
#
|
||||
# This is free software, lisence use MIT.
|
||||
#
|
||||
|
||||
name: Merge-Upstream-Lede
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- Lede
|
||||
paths:
|
||||
- '.github/workflows/sync_lede.yml'
|
||||
- '.gitignore'
|
||||
- '.github/diy/**'
|
||||
schedule:
|
||||
- cron: 5 */8 * * *
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ssh:
|
||||
description: '开启SSH远程配置'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
env:
|
||||
BRANCH: Lede
|
||||
|
||||
jobs:
|
||||
merge:
|
||||
if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id
|
||||
runs-on: Ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Check inputs
|
||||
run: |
|
||||
echo github.ref is: ${{ github.ref }}
|
||||
echo github.event_name is: ${{ github.event_name }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.BRANCH }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set git identity
|
||||
run : |
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
sudo timedatectl set-timezone "Asia/Shanghai"
|
||||
|
||||
- name: Syn upstream
|
||||
run: |
|
||||
shopt -s extglob
|
||||
set +e
|
||||
git rm -r --cached * >/dev/null 2>&1 &
|
||||
rm -rf `find ./* -maxdepth 0 -type d ! -name ".github/diy"` >/dev/null 2>&1
|
||||
|
||||
function git_clone() {
|
||||
if [ -n "$2" ]; then
|
||||
rm -rf $2
|
||||
fi
|
||||
git clone --depth 1 $1 $2
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $1"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
}
|
||||
|
||||
function git_branch_clone() {
|
||||
if [ -n "$3" ]; then
|
||||
rm -rf $3
|
||||
fi
|
||||
git clone --depth 1 -b $1 $2 $3
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $2"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
}
|
||||
|
||||
function git_sparse_clone() {
|
||||
branch="$1" rurl="$2" localdir="$3" && shift 3
|
||||
git clone -b $branch --depth 1 --filter=blob:none --sparse $rurl $localdir
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $rurl"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
cd $localdir
|
||||
git sparse-checkout init --cone
|
||||
git sparse-checkout set $@
|
||||
mv -n $@ ../ || true
|
||||
cd ..
|
||||
rm -rf $localdir
|
||||
}
|
||||
|
||||
function git_sparse_clone2() {
|
||||
commitid="$1" rurl="$2" localdir="$3" && shift 3
|
||||
git clone --filter=blob:none --sparse $rurl $localdir
|
||||
cd $localdir
|
||||
git checkout $commitid
|
||||
git sparse-checkout init --cone
|
||||
git sparse-checkout set $@
|
||||
mv -n $@ ../ || true
|
||||
cd ..
|
||||
rm -rf $localdir
|
||||
}
|
||||
|
||||
function git_partial_clone() {
|
||||
if [ "$#" -lt 4 ]; then
|
||||
echo "Usage: git_partial_clone <repo_branch> <repo_url> <local_save_dir> <repo_folders_path>"
|
||||
return 1
|
||||
fi
|
||||
local repo_branch="$1"
|
||||
local repo_url="$2"
|
||||
local local_save_dir="$3"
|
||||
|
||||
mkdir ~/$local_save_dir
|
||||
cd ~/$local_save_dir
|
||||
git init --initial-branch=$repo_branch
|
||||
git remote add -f origin $repo_url > /dev/null 2>&1
|
||||
git config core.sparsecheckout true
|
||||
while [ $# -gt 0 ]; do
|
||||
echo $1 >> .git/info/sparse-checkout
|
||||
shift
|
||||
done
|
||||
git pull --depth=1 origin $repo_branch
|
||||
find ~/$local_save_dir -name ".git" | xargs rm -rf {}
|
||||
cd ..
|
||||
mv -f ~/$local_save_dir /$GITHUB_WORKSPACE/$local_save_dir
|
||||
}
|
||||
|
||||
function mvdir() {
|
||||
mv -n `find $1/* -maxdepth 0 -type d` ./
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
function mvdir_force() {
|
||||
mv -f `find $1/* -maxdepth 0 -type d` ./
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
function mvluci() {
|
||||
mv -n `find $1/* -maxdepth 0 -type d -name "luci-app-*"` ./
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
git_clone https://github.com/sirpdboy/luci-app-advanced
|
||||
git_clone https://github.com/honwen/luci-app-aliddns
|
||||
git_clone https://github.com/sbwml/luci-app-alist sbwmlalist
|
||||
git_clone https://github.com/roacn/luci-app-autoupdate
|
||||
git_clone https://github.com/sirpdboy/luci-app-autotimeset
|
||||
git_clone https://github.com/NateLol/luci-app-beardropper
|
||||
git_clone https://github.com/mingxiaoyu/luci-app-cloudflarespeedtest tmp && mvdir tmp/applications
|
||||
git_clone https://github.com/immortalwrt-collections/openwrt-cdnspeedtest && mvdir openwrt-cdnspeedtest
|
||||
git_clone https://github.com/sirpdboy/luci-app-ddns-go
|
||||
git_clone https://github.com/lisaac/luci-app-dockerman tmp && mvdir tmp/applications
|
||||
git_clone https://github.com/sirpdboy/luci-app-eqosplus
|
||||
git_clone https://github.com/sbwml/luci-app-mosdns mos
|
||||
git_clone https://github.com/sirpdboy/luci-app-netdata
|
||||
git_clone https://github.com/sirpdboy/netspeedtest tmp && mvdir tmp
|
||||
git_clone https://github.com/rufengsuixing/luci-app-onliner
|
||||
git_clone https://github.com/vernesong/OpenClash tmp && mvluci tmp
|
||||
git_clone https://github.com/sirpdboy/luci-app-parentcontrol
|
||||
git_clone https://github.com/sirpdboy/luci-app-partexp
|
||||
git_clone https://github.com/esirplayground/luci-app-poweroff
|
||||
git_clone https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
git_clone https://github.com/zzsj0928/luci-app-pushbot
|
||||
#git_clone https://github.com/sbwml/luci-app-qbittorrent sbwml_qbittorrent && mvdir sbwml_qbittorrent
|
||||
git_clone https://github.com/DevOpenWRT-Router/luci-app-rebootschedule
|
||||
git_clone https://github.com/doushang/luci-app-shortcutmenu tmp && mvluci tmp
|
||||
git_branch_clone lede https://github.com/pymumu/luci-app-smartdns
|
||||
git_clone https://github.com/pymumu/openwrt-smartdns smartdns
|
||||
git_clone https://github.com/Tencent-Cloud-Plugins/tencentcloud-openwrt-plugin-ddns tmp && mv -f tmp/tencentcloud_ddns ./tencentcloud_ddns && rm -rf tmp
|
||||
git_clone https://github.com/Tencent-Cloud-Plugins/tencentcloud-openwrt-plugin-cos tmp && mv -f tmp/tencentcloud_cos ./tencentcloud_cos && rm -rf tmp
|
||||
git_branch_clone master https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
|
||||
git_branch_clone openwrt-18.06 https://github.com/tty228/luci-app-wechatpush
|
||||
git_clone https://github.com/walkingsky/luci-wifidog luci-app-wifidog
|
||||
|
||||
git_clone https://github.com/xiaorouji/openwrt-passwall-packages && mvdir_force openwrt-passwall-packages
|
||||
git_clone https://github.com/xiaorouji/openwrt-passwall tmp && mvluci tmp
|
||||
git_clone https://github.com/xiaorouji/openwrt-passwall2 tmp &&mvluci tmp
|
||||
git_branch_clone main https://github.com/fw876/helloworld && mvdir helloworld
|
||||
|
||||
git_clone https://github.com/linkease/nas-packages-luci tmp && mvdir tmp/luci
|
||||
git_clone https://github.com/linkease/nas-packages tmp && mvdir tmp/multimedia
|
||||
git_clone https://github.com/linkease/nas-packages tmp && mvdir tmp/network/services
|
||||
git_clone https://github.com/linkease/istore
|
||||
|
||||
git_partial_clone main https://github.com/messense/aliyundrive-webdav luci-app-aliyundrive-webdav openwrt/luci-app-aliyundrive-webdav openwrt/aliyundrive-webdav
|
||||
git_partial_clone v5 https://github.com/sbwml/luci-app-mosdns luci-app-mosdns luci-app-mosdns mosdns v2dat
|
||||
|
||||
git_clone https://github.com/openwrt-develop/luci-theme-atmaterial
|
||||
git_clone https://github.com/sirpdboy/luci-theme-btmod
|
||||
git_clone https://github.com/netitgo/luci-theme-jj
|
||||
git_clone https://github.com/thinktip/luci-theme-neobird
|
||||
git_clone https://github.com/sirpdboy/luci-theme-opentopd
|
||||
git_branch_clone 18.06 https://github.com/jerrykuku/luci-theme-argon
|
||||
git_branch_clone 18.06 https://github.com/jerrykuku/luci-app-argon-config
|
||||
git_clone https://github.com/Aslin-Ameng/luci-theme-Light tmp && mvdir tmp
|
||||
|
||||
- name: Delete duplicated packages
|
||||
continue-on-error: true
|
||||
run: |
|
||||
shopt -s extglob
|
||||
mv -f sbwmlalist/luci-app-alist luci-app-alist && mv -f sbwmlalist/alist alist ; rm -rf sbwmlalist
|
||||
cp -rf .github/diy/packages/* ./ || true
|
||||
rm -rf */.git
|
||||
|
||||
- name: Apply patches
|
||||
continue-on-error: true
|
||||
run: |
|
||||
find ".github/diy/patches" -type f -name '*.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -p1 -E --forward --no-backup-if-mismatch"
|
||||
|
||||
- name: Modify
|
||||
continue-on-error: true
|
||||
run: |
|
||||
bash .github/diy/create_acl_for_luci.sh -a >/dev/null 2>&1 || true
|
||||
bash .github/diy/convert_translation.sh -a >/dev/null 2>&1 || true
|
||||
|
||||
- name: SSH connection to Actions
|
||||
uses: kiddin9/debugger-action@master
|
||||
if: github.event.inputs.ssh == 'true'
|
||||
|
||||
- name: Apply
|
||||
continue-on-error: true
|
||||
run: |
|
||||
Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "💋" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤")
|
||||
git add .
|
||||
if [ -n "$(git status -s)" ]; then
|
||||
git commit -m "${Emoji[$[$RANDOM % ${#Emoji[@]}]]} Sync $(date +%Y-%m-%d" "%H:%M)"
|
||||
git push -f origin ${{ env.BRANCH }}
|
||||
fi
|
||||
|
||||
- name: Delete workflow runs
|
||||
uses: Mattraks/delete-workflow-runs@main
|
||||
continue-on-error: true
|
||||
with:
|
||||
retain_days: 0
|
||||
keep_minimum_runs: 2
|
||||
|
449
.github/workflows/sync_official.yml
vendored
449
.github/workflows/sync_official.yml
vendored
@ -1,208 +1,241 @@
|
||||
#
|
||||
# This is free software, lisence use MIT.
|
||||
#
|
||||
|
||||
name: Merge-Upstream-Official
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- Official
|
||||
paths:
|
||||
- '.github/workflows/sync_official.yml'
|
||||
- '.gitignore'
|
||||
- '.github/diy/**'
|
||||
schedule:
|
||||
- cron: 25 */8 * * *
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ssh:
|
||||
description: '开启SSH远程配置'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
|
||||
env:
|
||||
BRANCH: Official
|
||||
|
||||
jobs:
|
||||
merge:
|
||||
if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id
|
||||
runs-on: Ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Check inputs
|
||||
run: |
|
||||
echo github.ref is: ${{ github.ref }}
|
||||
echo github.event_name is: ${{ github.event_name }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.BRANCH }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set git identity
|
||||
run : |
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
sudo timedatectl set-timezone "Asia/Shanghai"
|
||||
|
||||
- name: Syn upstream
|
||||
run: |
|
||||
shopt -s extglob
|
||||
set +e
|
||||
git rm -r --cached * >/dev/null 2>&1 &
|
||||
rm -rf `find ./* -maxdepth 0 -type d ! -name ".github/diy"` >/dev/null 2>&1
|
||||
|
||||
function git_clone() {
|
||||
git clone --depth 1 $1 $2
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $1"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
}
|
||||
|
||||
function git_branch_clone() {
|
||||
git clone --depth 1 -b $1 $2 $3
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $2"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
}
|
||||
|
||||
function git_sparse_clone() {
|
||||
branch="$1" rurl="$2" localdir="$3" && shift 3
|
||||
git clone -b $branch --depth 1 --filter=blob:none --sparse $rurl $localdir
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $rurl"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
cd $localdir
|
||||
git sparse-checkout init --cone
|
||||
git sparse-checkout set $@
|
||||
mv -n $@ ../ || true
|
||||
cd ..
|
||||
rm -rf $localdir
|
||||
}
|
||||
|
||||
function git_sparse_clone2() {
|
||||
commitid="$1" rurl="$2" localdir="$3" && shift 3
|
||||
git clone --filter=blob:none --sparse $rurl $localdir
|
||||
cd $localdir
|
||||
git checkout $commitid
|
||||
git sparse-checkout init --cone
|
||||
git sparse-checkout set $@
|
||||
mv -n $@ ../ || true
|
||||
cd ..
|
||||
rm -rf $localdir
|
||||
}
|
||||
|
||||
function mvdir() {
|
||||
mv -n `find $1/* -maxdepth 0 -type d` ./
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
function mvdir_force() {
|
||||
mv -f `find $1/* -maxdepth 0 -type d` ./
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
git_clone https://github.com/sirpdboy/luci-app-advanced
|
||||
git_clone https://github.com/honwen/luci-app-aliddns
|
||||
git_clone https://github.com/sbwml/luci-app-alist sbwmlalist
|
||||
svn export https://github.com/messense/aliyundrive-webdav/trunk/openwrt && mvdir openwrt
|
||||
git_clone https://github.com/roacn/luci-app-autoupdate
|
||||
git_clone https://github.com/sirpdboy/luci-app-autotimeset
|
||||
git_clone https://github.com/NateLol/luci-app-beardropper
|
||||
git_clone https://github.com/mingxiaoyu/luci-app-cloudflarespeedtest.git cloudflarespeedtest
|
||||
svn export https://github.com/immortalwrt-collections/openwrt-cdnspeedtest/trunk/cdnspeedtest
|
||||
git_clone https://github.com/sirpdboy/luci-app-eqosplus
|
||||
git_clone https://github.com/sbwml/luci-app-mosdns mos
|
||||
git_clone https://github.com/sirpdboy/luci-app-netdata
|
||||
svn export https://github.com/sirpdboy/netspeedtest/trunk/luci-app-netspeedtest
|
||||
svn export https://github.com/sirpdboy/netspeedtest/trunk/homebox
|
||||
svn export https://github.com/coolsnowwolf/gargoyle/trunk/package/addon/lean/vsftpd-alt
|
||||
git_clone https://github.com/rufengsuixing/luci-app-onliner
|
||||
svn export https://github.com/vernesong/OpenClash/trunk/luci-app-openclash
|
||||
git_clone https://github.com/sirpdboy/luci-app-parentcontrol
|
||||
git_clone https://github.com/esirplayground/luci-app-poweroff
|
||||
git_clone https://github.com/zzsj0928/luci-app-pushbot
|
||||
git_clone https://github.com/sbwml/luci-app-qbittorrent sbwml_qbittorrent && mvdir sbwml_qbittorrent
|
||||
git_clone https://github.com/DevOpenWRT-Router/luci-app-rebootschedule
|
||||
svn export https://github.com/doushang/luci-app-shortcutmenu/trunk/luci-app-shortcutmenu
|
||||
#git_clone https://github.com/pymumu/luci-app-smartdns
|
||||
#git_clone https://github.com/pymumu/openwrt-smartdns smartdns
|
||||
svn export https://github.com/Tencent-Cloud-Plugins/tencentcloud-openwrt-plugin-ddns/trunk/tencentcloud_ddns luci-app-tencentddns
|
||||
svn export https://github.com/Tencent-Cloud-Plugins/tencentcloud-openwrt-plugin-cos/trunk/tencentcloud_cos luci-app-tencentcloud-cos
|
||||
git_branch_clone master https://github.com/tty228/luci-app-wechatpush
|
||||
git_clone https://github.com/walkingsky/luci-wifidog luci-app-wifidog
|
||||
#git_branch_clone master https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
|
||||
git_branch_clone js https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
|
||||
#git_clone https://github.com/maxlicheng/luci-app-unblockmusic.git
|
||||
svn export https://github.com/brvphoenix/luci-app-wrtbwmon/trunk/luci-app-wrtbwmon
|
||||
git_clone https://github.com/sbwml/luci-app-xunlei
|
||||
svn export https://github.com/brvphoenix/wrtbwmon/trunk/wrtbwmon
|
||||
|
||||
git_clone https://github.com/xiaorouji/openwrt-passwall-packages && mvdir_force openwrt-passwall-packages
|
||||
svn export https://github.com/xiaorouji/openwrt-passwall/trunk/luci-app-passwall
|
||||
svn export https://github.com/xiaorouji/openwrt-passwall2/trunk/luci-app-passwall2
|
||||
git_branch_clone main https://github.com/fw876/helloworld && mvdir helloworld
|
||||
|
||||
svn export https://github.com/linkease/nas-packages-luci/trunk/luci ./linkease/nas/luci && mv -n ./linkease/nas/luci/* ./linkease && rm -rf ./linkease/nas
|
||||
svn export https://github.com/linkease/nas-packages/trunk/network/services ./linkease/nas/network/services && mv -n ./linkease/nas/network/services/* ./linkease && rm -rf ./linkease/nas
|
||||
svn export https://github.com/linkease/nas-packages/trunk/multimedia/ffmpeg-remux ./linkease/nas/multimedia/ffmpeg-remux && mv -n ./linkease/nas/multimedia/* ./linkease && rm -rf ./linkease/nas
|
||||
svn export https://github.com/linkease/istore/trunk/luci ./linkease/iStore/luci && mv -n ./linkease/iStore/luci/* ./linkease && rm -rf ./linkease/iStore
|
||||
svn export https://github.com/linkease/istore/trunk/translations ./linkease/translations
|
||||
|
||||
git_branch_clone master https://github.com/jerrykuku/luci-theme-argon
|
||||
git_branch_clone master https://github.com/jerrykuku/luci-app-argon-config
|
||||
git_clone https://github.com/derisamedia/luci-theme-alpha
|
||||
svn export https://github.com/Aslin-Ameng/luci-theme-Light/trunk/luci-theme-Light
|
||||
|
||||
- name: Delete duplicated packages
|
||||
continue-on-error: true
|
||||
run: |
|
||||
shopt -s extglob
|
||||
mv -n cloudflarespeedtest/applications/luci-app-cloudflarespeedtest luci-app-cloudflarespeedtest ; rm -rf cloudflarespeedtest
|
||||
mv -f sbwmlalist/luci-app-alist luci-app-alist && mv -f sbwmlalist/alist alist ; rm -rf sbwmlalist
|
||||
rm -rf mosdns && mv -f mos/luci-app-mosdns luci-app-mosdns && mv -f mos/mosdns mosdns && mv -f mos/v2dat v2dat ; rm -rf mos
|
||||
cp -rf .github/diy/packages/* ./ || true
|
||||
rm -rf */.git
|
||||
|
||||
- name: Apply patches
|
||||
continue-on-error: true
|
||||
run: |
|
||||
find ".github/diy/patches" -type f -name '*.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -p1 -E --forward --no-backup-if-mismatch"
|
||||
|
||||
- name: Modify
|
||||
continue-on-error: true
|
||||
run: |
|
||||
bash .github/diy/create_acl_for_luci.sh -a >/dev/null 2>&1 || true
|
||||
bash .github/diy/convert_translation.sh -a >/dev/null 2>&1 || true
|
||||
|
||||
- name: SSH connection to Actions
|
||||
uses: kiddin9/debugger-action@master
|
||||
if: github.event.inputs.ssh == 'true'
|
||||
|
||||
- name: Apply
|
||||
continue-on-error: true
|
||||
run: |
|
||||
Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "💋" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤")
|
||||
git add .
|
||||
if [ -n "$(git status -s)" ]; then
|
||||
git commit -m "${Emoji[$[$RANDOM % ${#Emoji[@]}]]} Sync $(date +%Y-%m-%d" "%H:%M)"
|
||||
git push -f origin ${{ env.BRANCH }}
|
||||
fi
|
||||
|
||||
- name: Delete workflow runs
|
||||
uses: Mattraks/delete-workflow-runs@main
|
||||
continue-on-error: true
|
||||
with:
|
||||
retain_days: 0
|
||||
keep_minimum_runs: 2
|
||||
#
|
||||
# This is free software, lisence use MIT.
|
||||
#
|
||||
|
||||
name: Merge-Upstream-Official
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- Official
|
||||
paths:
|
||||
- '.github/workflows/sync_official.yml'
|
||||
- '.gitignore'
|
||||
- '.github/diy/**'
|
||||
schedule:
|
||||
- cron: 25 */8 * * *
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ssh:
|
||||
description: '开启SSH远程配置'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
|
||||
env:
|
||||
BRANCH: Official
|
||||
|
||||
jobs:
|
||||
merge:
|
||||
if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id
|
||||
runs-on: Ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Check inputs
|
||||
run: |
|
||||
echo github.ref is: ${{ github.ref }}
|
||||
echo github.event_name is: ${{ github.event_name }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.BRANCH }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set git identity
|
||||
run : |
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
sudo timedatectl set-timezone "Asia/Shanghai"
|
||||
|
||||
- name: Syn upstream
|
||||
run: |
|
||||
shopt -s extglob
|
||||
set +e
|
||||
git rm -r --cached * >/dev/null 2>&1 &
|
||||
rm -rf `find ./* -maxdepth 0 -type d ! -name ".github/diy"` >/dev/null 2>&1
|
||||
|
||||
function git_clone() {
|
||||
if [ -n "$2" ]; then
|
||||
rm -rf $2
|
||||
fi
|
||||
git clone --depth 1 $1 $2
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $1"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
}
|
||||
|
||||
function git_branch_clone() {
|
||||
if [ -n "$3" ]; then
|
||||
rm -rf $3
|
||||
fi
|
||||
git clone --depth 1 -b $1 $2 $3
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $2"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
}
|
||||
|
||||
function git_sparse_clone() {
|
||||
branch="$1" rurl="$2" localdir="$3" && shift 3
|
||||
git clone -b $branch --depth 1 --filter=blob:none --sparse $rurl $localdir
|
||||
if [ "$?" != 0 ]; then
|
||||
echo "error on $rurl"
|
||||
pid="$( ps -q $$ )"
|
||||
kill $pid
|
||||
fi
|
||||
cd $localdir
|
||||
git sparse-checkout init --cone
|
||||
git sparse-checkout set $@
|
||||
mv -n $@ ../ || true
|
||||
cd ..
|
||||
rm -rf $localdir
|
||||
}
|
||||
|
||||
function git_sparse_clone2() {
|
||||
commitid="$1" rurl="$2" localdir="$3" && shift 3
|
||||
git clone --filter=blob:none --sparse $rurl $localdir
|
||||
cd $localdir
|
||||
git checkout $commitid
|
||||
git sparse-checkout init --cone
|
||||
git sparse-checkout set $@
|
||||
mv -n $@ ../ || true
|
||||
cd ..
|
||||
rm -rf $localdir
|
||||
}
|
||||
|
||||
function git_partial_clone() {
|
||||
if [ "$#" -lt 4 ]; then
|
||||
echo "Usage: git_partial_clone <repo_branch> <repo_url> <local_save_dir> <repo_folders_path>"
|
||||
return 1
|
||||
fi
|
||||
local repo_branch="$1"
|
||||
local repo_url="$2"
|
||||
local local_save_dir="$3"
|
||||
|
||||
mkdir ~/$local_save_dir
|
||||
cd ~/$local_save_dir
|
||||
git init --initial-branch=$repo_branch
|
||||
git remote add -f origin $repo_url > /dev/null 2>&1
|
||||
git config core.sparsecheckout true
|
||||
while [ $# -gt 0 ]; do
|
||||
echo $1 >> .git/info/sparse-checkout
|
||||
shift
|
||||
done
|
||||
git pull --depth=1 origin $repo_branch
|
||||
find ~/$local_save_dir -name ".git" | xargs rm -rf {}
|
||||
cd ..
|
||||
mv -f ~/$local_save_dir /$GITHUB_WORKSPACE/$local_save_dir
|
||||
}
|
||||
|
||||
function mvdir() {
|
||||
mv -n `find $1/* -maxdepth 0 -type d` ./
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
function mvdir_force() {
|
||||
mv -f `find $1/* -maxdepth 0 -type d` ./
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
function mvluci() {
|
||||
mv -n `find $1/* -maxdepth 0 -type d -name "luci-app-*"` ./
|
||||
rm -rf $1
|
||||
}
|
||||
|
||||
git_clone https://github.com/sirpdboy/luci-app-advanced
|
||||
git_clone https://github.com/honwen/luci-app-aliddns
|
||||
git_clone https://github.com/sbwml/luci-app-alist sbwmlalist
|
||||
git_clone https://github.com/roacn/luci-app-autoupdate
|
||||
git_clone https://github.com/sirpdboy/luci-app-autotimeset
|
||||
git_clone https://github.com/NateLol/luci-app-beardropper
|
||||
git_clone https://github.com/mingxiaoyu/luci-app-cloudflarespeedtest tmp && mvdir tmp/applications
|
||||
git_clone https://github.com/immortalwrt-collections/openwrt-cdnspeedtest && mvdir openwrt-cdnspeedtest
|
||||
git_clone https://github.com/sirpdboy/luci-app-eqosplus
|
||||
git_clone https://github.com/sbwml/luci-app-mosdns mos
|
||||
git_clone https://github.com/sirpdboy/luci-app-netdata
|
||||
git_clone https://github.com/sirpdboy/netspeedtest tmp && mvdir tmp
|
||||
git_clone https://github.com/rufengsuixing/luci-app-onliner
|
||||
git_clone https://github.com/vernesong/OpenClash tmp && mvluci tmp
|
||||
git_clone https://github.com/sirpdboy/luci-app-parentcontrol
|
||||
git_clone https://github.com/sirpdboy/luci-app-partexp
|
||||
git_clone https://github.com/esirplayground/luci-app-poweroff
|
||||
git_clone https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
git_clone https://github.com/zzsj0928/luci-app-pushbot
|
||||
git_clone https://github.com/sbwml/luci-app-qbittorrent sbwml_qbittorrent && mvdir sbwml_qbittorrent
|
||||
git_clone https://github.com/DevOpenWRT-Router/luci-app-rebootschedule
|
||||
git_clone https://github.com/doushang/luci-app-shortcutmenu tmp && mvluci tmp
|
||||
#git_clone https://github.com/pymumu/luci-app-smartdns
|
||||
#git_clone https://github.com/pymumu/openwrt-smartdns smartdns
|
||||
git_clone https://github.com/Tencent-Cloud-Plugins/tencentcloud-openwrt-plugin-ddns tmp && mv -f tmp/tencentcloud_ddns ./tencentcloud_ddns && rm -rf tmp
|
||||
git_clone https://github.com/Tencent-Cloud-Plugins/tencentcloud-openwrt-plugin-cos tmp && mv -f tmp/tencentcloud_cos ./tencentcloud_cos && rm -rf tmp
|
||||
git_branch_clone master https://github.com/tty228/luci-app-wechatpush
|
||||
git_clone https://github.com/walkingsky/luci-wifidog luci-app-wifidog
|
||||
#git_branch_clone master https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
|
||||
git_branch_clone js https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
|
||||
#git_clone https://github.com/maxlicheng/luci-app-unblockmusic.git
|
||||
git_clone https://github.com/brvphoenix/luci-app-wrtbwmon tmp && mvdir tmp
|
||||
git_clone https://github.com/brvphoenix/wrtbwmon tmp && mvdir tmp
|
||||
git_clone https://github.com/sbwml/luci-app-xunlei
|
||||
|
||||
git_clone https://github.com/xiaorouji/openwrt-passwall-packages && mvdir_force openwrt-passwall-packages
|
||||
git_clone https://github.com/xiaorouji/openwrt-passwall tmp && mvluci tmp
|
||||
git_clone https://github.com/xiaorouji/openwrt-passwall2 tmp &&mvluci tmp
|
||||
git_branch_clone main https://github.com/fw876/helloworld && mvdir helloworld
|
||||
|
||||
git_clone https://github.com/linkease/nas-packages-luci tmp && mvdir tmp/luci
|
||||
git_clone https://github.com/linkease/nas-packages tmp && mvdir tmp/multimedia
|
||||
git_clone https://github.com/linkease/nas-packages tmp && mvdir tmp/network/services
|
||||
git_clone https://github.com/linkease/istore
|
||||
|
||||
git_partial_clone main https://github.com/messense/aliyundrive-webdav luci-app-aliyundrive-webdav openwrt/luci-app-aliyundrive-webdav openwrt/aliyundrive-webdav
|
||||
git_partial_clone v5 https://github.com/sbwml/luci-app-mosdns luci-app-mosdns luci-app-mosdns mosdns v2dat
|
||||
git_branch_clone master https://github.com/jerrykuku/luci-theme-argon
|
||||
git_branch_clone master https://github.com/jerrykuku/luci-app-argon-config
|
||||
git_clone https://github.com/derisamedia/luci-theme-alpha
|
||||
git_clone https://github.com/Aslin-Ameng/luci-theme-Light tmp && mvdir tmp
|
||||
|
||||
- name: Delete duplicated packages
|
||||
continue-on-error: true
|
||||
run: |
|
||||
shopt -s extglob
|
||||
mv -f sbwmlalist/luci-app-alist luci-app-alist && mv -f sbwmlalist/alist alist ; rm -rf sbwmlalist
|
||||
cp -rf .github/diy/packages/* ./ || true
|
||||
rm -rf */.git
|
||||
|
||||
- name: Apply patches
|
||||
continue-on-error: true
|
||||
run: |
|
||||
find ".github/diy/patches" -type f -name '*.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -p1 -E --forward --no-backup-if-mismatch"
|
||||
|
||||
- name: Modify
|
||||
continue-on-error: true
|
||||
run: |
|
||||
bash .github/diy/create_acl_for_luci.sh -a >/dev/null 2>&1 || true
|
||||
bash .github/diy/convert_translation.sh -a >/dev/null 2>&1 || true
|
||||
|
||||
- name: SSH connection to Actions
|
||||
uses: kiddin9/debugger-action@master
|
||||
if: github.event.inputs.ssh == 'true'
|
||||
|
||||
- name: Apply
|
||||
continue-on-error: true
|
||||
run: |
|
||||
Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "💋" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤")
|
||||
git add .
|
||||
if [ -n "$(git status -s)" ]; then
|
||||
git commit -m "${Emoji[$[$RANDOM % ${#Emoji[@]}]]} Sync $(date +%Y-%m-%d" "%H:%M)"
|
||||
git push -f origin ${{ env.BRANCH }}
|
||||
fi
|
||||
|
||||
- name: Delete workflow runs
|
||||
uses: Mattraks/delete-workflow-runs@main
|
||||
continue-on-error: true
|
||||
with:
|
||||
retain_days: 0
|
||||
keep_minimum_runs: 2
|
||||
|
Loading…
Reference in New Issue
Block a user