Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd48ea46

Browse files
committed
Create proxy-tools
0 parents  commitd48ea46

File tree

7 files changed

+1095
-0
lines changed

7 files changed

+1095
-0
lines changed

‎.github/dependabot.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version:2
2+
updates:
3+
-package-ecosystem:"github-actions"
4+
directory:"/"
5+
schedule:
6+
interval:"daily"
7+
timezone:"Asia/Shanghai"
8+
time:"06:00"
9+
pull-request-branch-name:
10+
separator:"-"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name:Delete old workflows
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
-cron:'0 22 * * *'
6+
7+
jobs:
8+
del_runs:
9+
runs-on:ubuntu-latest
10+
permissions:
11+
actions:write
12+
steps:
13+
-name:Delete old workflow runs
14+
uses:Mattraks/delete-workflow-runs@v2
15+
with:
16+
token:${{ github.token }}
17+
repository:${{ github.repository }}
18+
retain_days:3
19+
keep_minimum_runs:1
Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
name:Update AdGuard Home
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
-cron:"0 17 * * *"
6+
push:
7+
branches:
8+
-main
9+
paths-ignore:
10+
-"README.md"
11+
-".github/workflows/delete-old-workflows.yml"
12+
-".github/workflows/update-dashboard.yml"
13+
-".github/workflows/update-mihomo.yml"
14+
-".github/workflows/update-singbox.yml"
15+
16+
jobs:
17+
go:
18+
runs-on:ubuntu-latest
19+
outputs:
20+
version:${{ steps.go.outputs.version }}
21+
steps:
22+
-name:Get `Go` latest version
23+
id:go
24+
run:|
25+
echo version=$(curl -sSL https://raw.githubusercontent.com/actions/go-versions/update-versions-manifest-file/versions-manifest.json | jq -r '.[0].version') >> $GITHUB_OUTPUT
26+
27+
node:
28+
runs-on:ubuntu-latest
29+
outputs:
30+
version:${{ steps.node.outputs.version }}
31+
steps:
32+
-name:Get `Node` latest version (LTS)
33+
id:node
34+
run:|
35+
echo version=$(curl -sSL https://nodejs.org/dist/index.json | jq -r 'map(select(.lts)) | .[0].version[1:]') >> $GITHUB_OUTPUT
36+
37+
release:
38+
runs-on:ubuntu-latest
39+
outputs:
40+
release_version:${{ steps.release.outputs.release_version }}
41+
release_time:${{ steps.release.outputs.release_time }}
42+
steps:
43+
-name:Get `AdGuard Home Release` version and time
44+
id:release
45+
run:|
46+
release_version=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases/latest | jq -r '.tag_name')
47+
echo "release_version=$release_version" >> $GITHUB_OUTPUT
48+
release_time=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
49+
echo "release_time=$release_time" >> $GITHUB_OUTPUT
50+
51+
release_cross:
52+
runs-on:ubuntu-latest
53+
strategy:
54+
matrix:
55+
include:
56+
# Linux
57+
-{ name: linux_amd64, goos: linux, goarch: amd64, goamd64: v1 }
58+
-{ name: linux_armv5, goos: linux, goarch: arm, goarm: 5 }
59+
-{ name: linux_armv6, goos: linux, goarch: arm, goarm: 6 }
60+
-{ name: linux_armv7, goos: linux, goarch: arm, goarm: 7 }
61+
-{ name: linux_arm64, goos: linux, goarch: arm64 }
62+
-{ name: linux_mips_softfloat, goos: linux, goarch: mips, gomips: softfloat }
63+
-{ name: linux_mipsle_softfloat, goos: linux, goarch: mipsle, gomips: softfloat }
64+
# Windows
65+
-{ name: windows_amd64, goos: windows, goarch: amd64, goamd64: v1 }
66+
-{ name: windows_arm64, goos: windows, goarch: arm64 }
67+
68+
fail-fast:false
69+
needs:
70+
-go
71+
-node
72+
-release
73+
env:
74+
release_VERSION:${{ needs.release.outputs.release_version }}
75+
steps:
76+
-name:Checkout `AdguardTeam/AdGuardHome`
77+
uses:actions/checkout@v4
78+
with:
79+
repository:AdguardTeam/AdGuardHome
80+
81+
-name:Setup `Go`
82+
uses:actions/setup-go@v5
83+
with:
84+
go-version:${{ needs.go.outputs.version }}
85+
86+
-name:Adapt `Go` version
87+
run:|
88+
go get go@${{ needs.go.outputs.version }}
89+
go mod tidy
90+
91+
-name:Setup `Node`
92+
uses:actions/setup-node@v4
93+
with:
94+
node-version:${{ needs.node.outputs.version }}
95+
96+
-name:Setup `Snapcraft`
97+
run:|
98+
sudo snap install snapcraft --classic
99+
100+
-name:Build `AdGuard Home Release`
101+
id:build
102+
run:|
103+
make SIGN=0 VERBOSE=1 ARCH=${{ matrix.goarch }} OS=${{ matrix.goos }} CHANNEL=release VERSION=${{ env.release_VERSION }} GOTOOLCHAIN=local build-release
104+
105+
-name:Upload files to workspace
106+
uses:actions/upload-artifact@v4
107+
with:
108+
name:AdGuardHome_release_${{ matrix.name }}
109+
path:'**/AdGuardHome/AdGuardHome*'
110+
compression-level:9
111+
112+
beta:
113+
runs-on:ubuntu-latest
114+
outputs:
115+
beta_version:${{ steps.beta.outputs.beta_version }}
116+
beta_time:${{ steps.beta.outputs.beta_time }}
117+
steps:
118+
-name:Get `AdGuard Home Beta` version and time
119+
id:beta
120+
run:|
121+
beta_version=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases | jq -r '[.[] | select(.tag_name | contains("b"))][0].tag_name')
122+
echo "beta_version=$beta_version" >> $GITHUB_OUTPUT
123+
beta_time=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases | jq -r '[.[] | select(.tag_name | contains("b"))][0].created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
124+
echo "beta_time=$beta_time" >> $GITHUB_OUTPUT
125+
126+
beta_cross:
127+
runs-on:ubuntu-latest
128+
strategy:
129+
matrix:
130+
include:
131+
# Linux
132+
-{ name: linux_amd64, goos: linux, goarch: amd64, goamd64: v1 }
133+
-{ name: linux_armv5, goos: linux, goarch: arm, goarm: 5 }
134+
-{ name: linux_armv6, goos: linux, goarch: arm, goarm: 6 }
135+
-{ name: linux_armv7, goos: linux, goarch: arm, goarm: 7 }
136+
-{ name: linux_arm64, goos: linux, goarch: arm64 }
137+
-{ name: linux_mips_softfloat, goos: linux, goarch: mips, gomips: softfloat }
138+
-{ name: linux_mipsle_softfloat, goos: linux, goarch: mipsle, gomips: softfloat }
139+
# Windows
140+
-{ name: windows_amd64, goos: windows, goarch: amd64, goamd64: v1 }
141+
-{ name: windows_arm64, goos: windows, goarch: arm64 }
142+
143+
fail-fast:false
144+
needs:
145+
-go
146+
-node
147+
-beta
148+
env:
149+
beta_VERSION:${{ needs.beta.outputs.beta_version }}
150+
steps:
151+
-name:Checkout `AdguardTeam/AdGuardHome`
152+
uses:actions/checkout@v4
153+
with:
154+
repository:AdguardTeam/AdGuardHome
155+
156+
-name:Setup `Go`
157+
uses:actions/setup-go@v5
158+
with:
159+
go-version:${{ needs.go.outputs.version }}
160+
161+
-name:Adapt `Go` version
162+
run:|
163+
go get go@${{ needs.go.outputs.version }}
164+
go mod tidy
165+
166+
-name:Setup `Node`
167+
uses:actions/setup-node@v4
168+
with:
169+
node-version:${{ needs.node.outputs.version }}
170+
171+
-name:Setup `Snapcraft`
172+
run:|
173+
sudo snap install snapcraft --classic
174+
175+
-name:Build `AdGuard Home Beta`
176+
id:build
177+
run:|
178+
make SIGN=0 VERBOSE=1 ARCH=${{ matrix.goarch }} OS=${{ matrix.goos }} CHANNEL=beta VERSION=${{ env.beta_VERSION }} GOTOOLCHAIN=local build-release
179+
180+
-name:Upload files to workspace
181+
uses:actions/upload-artifact@v4
182+
with:
183+
name:AdGuardHome_beta_${{ matrix.name }}
184+
path:'**/AdGuardHome/AdGuardHome*'
185+
compression-level:9
186+
187+
push_adguardhome:
188+
needs:
189+
-release_cross
190+
-release
191+
-beta_cross
192+
-beta
193+
runs-on:ubuntu-latest
194+
env:
195+
release_VERSION:${{ needs.release.outputs.release_version }}
196+
release_TIME:${{ needs.release.outputs.release_time }}
197+
beta_VERSION:${{ needs.beta.outputs.beta_version }}
198+
beta_TIME:${{ needs.beta.outputs.beta_time }}
199+
steps:
200+
-name:Clone Repository
201+
uses:actions/checkout@main
202+
203+
-name:Download files from workspace
204+
uses:actions/download-artifact@v4
205+
with:
206+
path:./tmp-AdGuardHome/
207+
208+
-name:Batch move and rename `AdGuard Home` files
209+
run:|
210+
mkdir -p ./tmp-AdGuardHome/compress/
211+
archs=(amd64 armv5 armv6 armv7 arm64 mips_softfloat mipsle_softfloat)
212+
new_name=(amd64 armv5 armv6 armv7 armv8 mips_softfloat mipsle_softfloat)
213+
for ((i = 0; i < 7; i++)); do
214+
mv -f "./tmp-AdGuardHome/AdGuardHome_release_linux_${archs[i]}/dist/AdGuardHome_linux_${archs[i]//v/_}/AdGuardHome/AdGuardHome" "./tmp-AdGuardHome/compress/AdGuardHome_release_linux_${new_name[i]}"
215+
mv -f "./tmp-AdGuardHome/AdGuardHome_beta_linux_${archs[i]}/dist/AdGuardHome_linux_${archs[i]//v/_}/AdGuardHome/AdGuardHome" "./tmp-AdGuardHome/compress/AdGuardHome_beta_linux_${new_name[i]}"
216+
done
217+
chmod +x ./tmp-AdGuardHome/compress/*
218+
219+
-name:Setup `upx` and compress `AdGuard Home` files
220+
uses:crazy-max/ghaction-upx@v3
221+
with:
222+
version:latest
223+
files:./tmp-AdGuardHome/compress/*
224+
225+
-name:Move `AdGuard Home` files
226+
run:|
227+
mkdir -p ./AdGuardHome/
228+
mv -f ./tmp-AdGuardHome/compress/* ./AdGuardHome/
229+
# `Release` for Windows
230+
mv -f ./tmp-AdGuardHome/AdGuardHome_release_windows_amd64/dist/AdGuardHome_windows_amd64/AdGuardHome/AdGuardHome.exe ./AdGuardHome/AdGuardHome_release_windows_amd64.exe
231+
mv -f ./tmp-AdGuardHome/AdGuardHome_release_windows_arm64/dist/AdGuardHome_windows_arm64/AdGuardHome/AdGuardHome.exe ./AdGuardHome/AdGuardHome_release_windows_arm64.exe
232+
233+
# `Beta` for Windows
234+
mv -f ./tmp-AdGuardHome/AdGuardHome_beta_windows_amd64/dist/AdGuardHome_windows_amd64/AdGuardHome/AdGuardHome.exe ./AdGuardHome/AdGuardHome_beta_windows_amd64.exe
235+
mv -f ./tmp-AdGuardHome/AdGuardHome_beta_windows_arm64/dist/AdGuardHome_windows_arm64/AdGuardHome/AdGuardHome.exe ./AdGuardHome/AdGuardHome_beta_windows_arm64.exe
236+
rm -rf ./tmp*
237+
238+
-name:Release and upload `AdGuardHome` assets
239+
uses:svenstaro/upload-release-action@v2
240+
with:
241+
repo_token:${{ secrets.GITHUB_TOKEN }}
242+
release_name:AdGuardHome
243+
tag:AdGuardHome
244+
overwrite:true
245+
body:|
246+
更新 [AdGuard Home Release 版](https://github.com/AdguardTeam/AdGuardHome/tree/beta-v0.107)至 ${{ env.release_VERSION }},发布于 ${{ env.release_TIME }}
247+
更新 [AdGuard Home Beta 版](https://github.com/AdguardTeam/AdGuardHome/tree/beta-v0.108)至 ${{ env.beta_VERSION }},发布于 ${{ env.beta_TIME }}
248+
file_glob:true
249+
file:./AdGuardHome/*
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name:Update Dashboard
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
-cron:"30 17 * * *"
6+
push:
7+
branches:
8+
-main
9+
paths-ignore:
10+
-"README.md"
11+
-".github/workflows/delete-old-workflows.yml"
12+
-".github/workflows/update-adguardhome.yml"
13+
-".github/workflows/update-mihomo.yml"
14+
-".github/workflows/update-singbox.yml"
15+
16+
jobs:
17+
Update:
18+
runs-on:ubuntu-latest
19+
steps:
20+
-name:Clone Repository
21+
uses:actions/checkout@main
22+
23+
-name:Get `yacd` version and time
24+
run:|
25+
yacd_version=$(curl -sSL https://api.github.com/repos/haishanh/yacd/releases/latest | jq -r '.tag_name')
26+
echo "yacd_version=$yacd_version" >> ${GITHUB_ENV}
27+
yacd_time=$(curl -sSL https://api.github.com/repos/haishanh/yacd/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
28+
echo "yacd_time=$yacd_time" >> ${GITHUB_ENV}
29+
30+
-name:Get `Yacd-meta` version and time
31+
run:|
32+
yacd_meta_version=$(curl -sSL https://api.github.com/repos/MetaCubeX/Yacd-meta/releases/latest | jq -r '.tag_name')
33+
echo "yacd_meta_version=$yacd_meta_version" >> ${GITHUB_ENV}
34+
yacd_meta_time=$(curl -sSL https://api.github.com/repos/MetaCubeX/Yacd-meta/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
35+
echo "yacd_meta_time=$yacd_meta_time" >> ${GITHUB_ENV}
36+
37+
-name:Get `metacubexd` version and time
38+
run:|
39+
metacubexd_version=$(curl -sSL https://api.github.com/repos/MetaCubeX/metacubexd/releases/latest | jq -r '.tag_name')
40+
echo "metacubexd_version=$metacubexd_version" >> ${GITHUB_ENV}
41+
metacubexd_time=$(curl -sSL https://api.github.com/repos/MetaCubeX/metacubexd/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
42+
echo "metacubexd_time=$metacubexd_time" >> ${GITHUB_ENV}
43+
44+
-name:Get `zashboard` version and time
45+
run:|
46+
zashboard_version=$(curl -sSL https://api.github.com/repos/Zephyruso/zashboard/releases/latest | jq -r '.tag_name')
47+
echo "zashboard_version=$zashboard_version" >> ${GITHUB_ENV}
48+
zashboard_time=$(curl -sSL https://api.github.com/repos/Zephyruso/zashboard/releases/latest | jq -r '.created_at' | xargs -I {} date -d '{} +8 hours' '+%Y-%m-%d')
49+
echo "zashboard_time=$zashboard_time" >> ${GITHUB_ENV}
50+
51+
-name:Download and compress `yacd` dashboard
52+
run:|
53+
mkdir -p ./Dashboard/ ./tmp/yacd/
54+
curl -o ./tmp/yacd/gh-pages.zip -L https://github.com/haishanh/yacd/archive/refs/heads/gh-pages.zip
55+
unzip -o ./tmp/yacd/gh-pages.zip -d ./tmp/yacd/
56+
tar -czf ./Dashboard/yacd.tar.gz -C ./tmp/yacd/yacd-gh-pages/ .
57+
58+
-name:Download and compress `Yacd-meta` dashboard
59+
run:|
60+
mkdir -p ./tmp/Yacd-meta/
61+
curl -o ./tmp/Yacd-meta/gh-pages.zip -L https://github.com/MetaCubeX/Yacd-meta/archive/refs/heads/gh-pages.zip
62+
unzip -o ./tmp/Yacd-meta/gh-pages.zip -d ./tmp/Yacd-meta/
63+
tar -czf ./Dashboard/Yacd-meta.tar.gz -C ./tmp/Yacd-meta/Yacd-meta-gh-pages/ .
64+
65+
-name:Download and compress `metacubexd` dashboard
66+
run:|
67+
mkdir -p ./tmp/metacubexd/
68+
curl -o ./tmp/metacubexd/gh-pages.zip -L https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip
69+
unzip -o ./tmp/metacubexd/gh-pages.zip -d ./tmp/metacubexd/
70+
tar -czf ./Dashboard/metacubexd.tar.gz -C ./tmp/metacubexd/metacubexd-gh-pages/ .
71+
72+
-name:Download and compress `zashboard` dashboard
73+
run:|
74+
mkdir -p ./tmp/zashboard/
75+
curl -o ./tmp/zashboard/gh-pages.zip -L https://github.com/Zephyruso/zashboard/releases/latest/download/dist-cdn-fonts.zip
76+
unzip -o ./tmp/zashboard/gh-pages.zip -d ./tmp/zashboard/
77+
tar -czf ./Dashboard/zashboard.tar.gz -C ./tmp/zashboard/dist/ .
78+
rm -rf ./tmp*
79+
80+
-name:Release and upload `Dashboard` assets
81+
uses:svenstaro/upload-release-action@v2
82+
with:
83+
repo_token:${{ secrets.GITHUB_TOKEN }}
84+
release_name:Dashboard
85+
tag:Dashboard
86+
overwrite:true
87+
body:|
88+
更新 [yacd 面板](https://github.com/haishanh/yacd)至 ${{ env.yacd_version }},发布于 ${{ env.yacd_time }}
89+
更新 [Yacd-meta 面板](https://github.com/MetaCubeX/Yacd-meta)至 ${{ env.yacd_meta_version }},发布于 ${{ env.yacd_meta_time }}
90+
更新 [metacubexd 面板](https://github.com/MetaCubeX/metacubexd)至 ${{ env.metacubexd_version }},发布于 ${{ env.metacubexd_time }}
91+
更新 [zashboard 面板](https://github.com/Zephyruso/zashboard)至 ${{ env.zashboard_version }},发布于 ${{ env.zashboard_time }}
92+
file_glob:true
93+
file:./Dashboard/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp