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