-
Notifications
You must be signed in to change notification settings - Fork 1.5k
52 lines (48 loc) · 1.51 KB
/
core_auto_update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: core_auto_update
on:
schedule:
- cron: 0 18 * * *
workflow_dispatch:
jobs:
check_version:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
repository: PuerNya/sing-box
ref: building
fetch-depth: 0
- name: Check version
run: |
git remote add sekai https://github.com/SagerNet/sing-box.git
git fetch --tags sekai
version_new=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag)
version_old=$(curl -sSl https://github.com/juewuy/ShellCrash/releases/download/singbox_core_PuerNya/version)
if [ "$version_old" != "$version_new" ];then
echo a=$version_old >> $GITHUB_ENV
echo b=$version_new >> $GITHUB_ENV
else
echo "未检查到版本更新,已退出!"
exit 1
fi
auto_update_singboxp_with_wg:
needs: check_version
if: ${{ success() }}
permissions: write-all
uses: juewuy/ShellCrash/.github/workflows/update_singbox_core.yaml@dev
with:
tag1: PuerNya/sing-box
tag2: building
tag3: singbox_core_PuerNya
tag5: with_quic,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_clash_api,with_gvisor
secrets: inherit
cleanup:
needs: check_version
runs-on: ubuntu-latest
steps:
- name: cleanup
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 2