From 553319b7705a60adfcd92c3bb1c7edb5e25db1e4 Mon Sep 17 00:00:00 2001 From: DustinWin Date: Thu, 2 Jan 2025 03:07:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E8=8E=B7=E5=8F=96=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E7=9A=84=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/update-adguardhome.yml | 18 +++---------- .github/workflows/update-dashboard.yml | 2 +- .github/workflows/update-mihomo.yml | 26 +++++------------- .github/workflows/update-singbox.yml | 34 +++++++----------------- README.md | 7 +++-- 5 files changed, 23 insertions(+), 64 deletions(-) diff --git a/.github/workflows/update-adguardhome.yml b/.github/workflows/update-adguardhome.yml index 8b24e9d1..99dcea3e 100644 --- a/.github/workflows/update-adguardhome.yml +++ b/.github/workflows/update-adguardhome.yml @@ -22,7 +22,7 @@ jobs: - name: Get `Go` latest version id: go run: | - echo version=$(curl -sSL https://raw.githubusercontent.com/actions/go-versions/update-versions-manifest-file/versions-manifest.json | grep '"version"' | head -1 | awk -F'"' '{print $4}') >> $GITHUB_OUTPUT + echo version=$(curl -sSL https://api.github.com/repos/actions/go-versions/releases/latest | jq -r '.tag_name | split("-")[0]') >> $GITHUB_OUTPUT node: runs-on: ubuntu-latest @@ -36,7 +36,6 @@ jobs: release: runs-on: ubuntu-latest - needs: go outputs: release_version: ${{ steps.release.outputs.release_version }} release_time: ${{ steps.release.outputs.release_time }} @@ -48,15 +47,10 @@ jobs: ref: beta-v0.107 fetch-depth: 0 - - name: Setup `Go` - uses: actions/setup-go@v5 - with: - go-version: ${{ needs.go.outputs.version }} - - name: Get `AdGuard Home Release` version and time id: release run: | - release_version=$(git describe --tags --abbrev=0 HEAD) + release_version=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases/latest | jq -r '.tag_name') echo "release_version=$release_version" >> $GITHUB_OUTPUT release_time=$(git log -1 --format=%cd --date=format:'%Y-%m-%d' ${release_version}) echo "release_time=$release_time" >> $GITHUB_OUTPUT @@ -125,7 +119,6 @@ jobs: beta: runs-on: ubuntu-latest - needs: go outputs: beta_version: ${{ steps.beta.outputs.beta_version }} beta_time: ${{ steps.beta.outputs.beta_time }} @@ -137,15 +130,10 @@ jobs: ref: beta-v0.108 fetch-depth: 0 - - name: Setup `Go` - uses: actions/setup-go@v5 - with: - go-version: ${{ needs.go.outputs.version }} - - name: Get `AdGuard Home Beta` version and time id: beta run: | - beta_version=$(git describe --tags --abbrev=0 HEAD) + beta_version=$(curl -sSL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases | jq -r '[.[] | select(.tag_name | test("b"))][0].tag_name') echo "beta_version=$beta_version" >> $GITHUB_OUTPUT beta_time=$(git log -1 --format=%cd --date=format:'%Y-%m-%d' ${beta_version}) echo "beta_time=$beta_time" >> $GITHUB_OUTPUT diff --git a/.github/workflows/update-dashboard.yml b/.github/workflows/update-dashboard.yml index 49bc5f39..51d59894 100644 --- a/.github/workflows/update-dashboard.yml +++ b/.github/workflows/update-dashboard.yml @@ -74,7 +74,7 @@ jobs: - name: Download and compress `yacd` dashboard run: | - mkdir -p ./tmp/yacd/ + mkdir -p ./Dashboard/ ./tmp/yacd/ curl -o ./tmp/yacd/gh-pages.zip -L https://github.com/haishanh/yacd/archive/refs/heads/gh-pages.zip unzip -o ./tmp/yacd/gh-pages.zip -d ./tmp/yacd/ tar -czf ./Dashboard/yacd.tar.gz -C ./tmp/yacd/yacd-gh-pages/ . diff --git a/.github/workflows/update-mihomo.yml b/.github/workflows/update-mihomo.yml index c99fc4d3..409e4cf3 100644 --- a/.github/workflows/update-mihomo.yml +++ b/.github/workflows/update-mihomo.yml @@ -22,11 +22,10 @@ jobs: - name: Get `Go` latest version id: go run: | - echo version=$(curl -sSL https://raw.githubusercontent.com/actions/go-versions/update-versions-manifest-file/versions-manifest.json | grep '"version"' | head -1 | awk -F'"' '{print $4}') >> $GITHUB_OUTPUT + echo version=$(curl -sSL https://api.github.com/repos/actions/go-versions/releases/latest | jq -r '.tag_name | split("-")[0]') >> $GITHUB_OUTPUT meta: runs-on: ubuntu-latest - needs: go outputs: meta_version: ${{ steps.meta.outputs.meta_version }} meta_tags: ${{ steps.meta.outputs.meta_tags }} @@ -39,15 +38,10 @@ jobs: ref: Meta fetch-depth: 0 - - name: Setup `Go` - uses: actions/setup-go@v5 - with: - go-version: ${{ needs.go.outputs.version }} - - - name: Get `mihomo Meta` version + - name: Get `mihomo Meta` version and time id: meta run: | - meta_version=$(git describe --tags --abbrev=0 HEAD) + meta_version=$(curl -sSL https://api.github.com/repos/MetaCubeX/mihomo/releases/latest | jq -r '.tag_name') echo "meta_version=$meta_version" >> $GITHUB_OUTPUT echo meta_tags=with_gvisor >> $GITHUB_OUTPUT meta_time=$(git log -1 --format=%cd --date=format:'%Y-%m-%d' ${meta_version}) @@ -117,9 +111,8 @@ jobs: alpha: runs-on: ubuntu-latest - needs: go outputs: - alpha_version: ${{ steps.alpha.outputs.alpha_version }} + alpha_version: alpha-${{ steps.alpha.outputs.alpha_version }} alpha_tags: ${{ steps.alpha.outputs.alpha_tags }} alpha_time: ${{ steps.alpha.outputs.alpha_time }} steps: @@ -130,18 +123,13 @@ jobs: ref: Alpha fetch-depth: 0 - - name: Setup `Go` - uses: actions/setup-go@v5 - with: - go-version: ${{ needs.go.outputs.version }} - - - name: Get `mihomo Alpha` version + - name: Get `mihomo Alpha` version and time id: alpha run: | - alpha_version=alpha-$(git rev-parse --short HEAD) + alpha_version=$(curl -sSL https://github.com/MetaCubeX/mihomo/releases/download/Prerelease-Alpha/version.txt | sed 's/.*-//') echo "alpha_version=$alpha_version" >> $GITHUB_OUTPUT echo alpha_tags=with_gvisor >> $GITHUB_OUTPUT - alpha_time=$(git log -1 --format=%cd --date=format:'%Y-%m-%d' $(git rev-parse --short HEAD)) + alpha_time=$(git log -1 --format=%cd --date=format:'%Y-%m-%d' ${alpha_version}) echo "alpha_time=$alpha_time" >> $GITHUB_OUTPUT alpha_cross: diff --git a/.github/workflows/update-singbox.yml b/.github/workflows/update-singbox.yml index 6e4ec602..dbdde4a6 100644 --- a/.github/workflows/update-singbox.yml +++ b/.github/workflows/update-singbox.yml @@ -22,7 +22,7 @@ jobs: - name: Get `Go` latest version id: go run: | - echo version=$(curl -sSL https://raw.githubusercontent.com/actions/go-versions/update-versions-manifest-file/versions-manifest.json | grep '"version"' | head -1 | awk -F'"' '{print $4}') >> $GITHUB_OUTPUT + echo version=$(curl -sSL https://api.github.com/repos/actions/go-versions/releases/latest | jq -r '.tag_name | split("-")[0]') >> $GITHUB_OUTPUT puernya: runs-on: ubuntu-latest @@ -125,7 +125,6 @@ jobs: release: runs-on: ubuntu-latest - needs: go outputs: release_version: ${{ steps.release.outputs.release_version }} release_tags: ${{ steps.release.outputs.release_tags }} @@ -138,20 +137,13 @@ jobs: ref: main fetch-depth: 0 - - name: Setup `Go` - uses: actions/setup-go@v5 - with: - go-version: ${{ needs.go.outputs.version }} - - - name: Get `sing-box Release` version + - name: Get `sing-box Release` version and time id: release run: | - git remote add sekai https://github.com/SagerNet/sing-box.git - git fetch --tags sekai - release_version=$(curl -sSL https://api.github.com/repos/SagerNet/sing-box/releases/latest | grep '"tag_name"' | head -n 1 | awk -F'"' '{print $4}' | sed 's/^v//') + release_version=$(curl -sSL https://api.github.com/repos/SagerNet/sing-box/releases/latest | jq -r '.tag_name') echo "release_version=$release_version" >> $GITHUB_OUTPUT echo release_tags=with_gvisor,with_dhcp,with_wireguard,with_clash_api,with_quic,with_utls,with_ech >> $GITHUB_OUTPUT - release_time=$(git log -1 --format=%cd --date=format:'%Y-%m-%d' v${release_version}) + release_time=$(git log -1 --format=%cd --date=format:'%Y-%m-%d' ${release_version}) echo "release_time=$release_time" >> $GITHUB_OUTPUT release_cross: @@ -221,7 +213,6 @@ jobs: dev: runs-on: ubuntu-latest - needs: go outputs: dev_version: ${{ steps.dev.outputs.dev_version }} dev_tags: ${{ steps.dev.outputs.dev_tags }} @@ -234,20 +225,13 @@ jobs: ref: dev fetch-depth: 0 - - name: Setup `Go` - uses: actions/setup-go@v5 - with: - go-version: ${{ needs.go.outputs.version }} - - - name: Get `sing-box Dev` version + - name: Get `sing-box Dev` version and time id: dev run: | - git remote add sekai https://github.com/SagerNet/sing-box.git - git fetch --tags sekai - dev_version=$(curl -sSL https://api.github.com/repos/SagerNet/sing-box/releases | grep '"tag_name"' | grep -E 'beta|alpha' | head -n 1 | awk -F'"' '{print $4}' | sed 's/^v//') + dev_version=$(curl -sSL https://api.github.com/repos/SagerNet/sing-box/releases | jq -r '[.[] | select(.tag_name | test("alpha|beta"))][0].tag_name') echo "dev_version=$dev_version" >> $GITHUB_OUTPUT echo dev_tags=with_gvisor,with_dhcp,with_wireguard,with_clash_api,with_quic,with_utls,with_ech >> $GITHUB_OUTPUT - dev_time=$(git log -1 --format=%cd --date=format:'%Y-%m-%d' v${dev_version}) + dev_time=$(git log -1 --format=%cd --date=format:'%Y-%m-%d' ${dev_version}) echo "dev_time=$dev_time" >> $GITHUB_OUTPUT dev_cross: @@ -395,8 +379,8 @@ jobs: overwrite: true body: | 更新 [sing-box PuerNya 版](https://github.com/PuerNya/sing-box/tree/building)至 v${{ env.puernya_VERSION }},发布于 ${{ env.puernya_TIME }} - 更新 [sing-box Release 版](https://github.com/SagerNet/sing-box/tree/main)至 v${{ env.release_VERSION }},发布于 ${{ env.release_TIME }} - 更新 [sing-box Dev 版](https://github.com/SagerNet/sing-box/tree/dev)至 v${{ env.dev_VERSION }},发布于 ${{ env.dev_TIME }} + 更新 [sing-box Release 版](https://github.com/SagerNet/sing-box/tree/main)至 ${{ env.release_VERSION }},发布于 ${{ env.release_TIME }} + 更新 [sing-box Dev 版](https://github.com/SagerNet/sing-box/tree/dev)至 ${{ env.dev_VERSION }},发布于 ${{ env.dev_TIME }} file_glob: true file: ./sing-box/* diff --git a/README.md b/README.md index 0bda5822..6d37afc3 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,9 @@ 每天凌晨(北京时间 UTC+8)自动构建生成: 1. [Clash Premium Release 版和 Nightly 版内核](https://github.com/DustinWin/proxy-tools/releases/tag/Clash-Premium)(已停更) 2. mihomo Meta 版和 Alpha 版内核 -3. sing-box Release 版和 Dev 版内核 -4. sing-box PuerNya 版内核(支持 `outbound_providers` 代理集合) -5. Dashboard 面板:[yacd 面板](https://github.com/haishanh/yacd)、[Yacd-meta 面板](https://github.com/MetaCubeX/Yacd-meta)、[metacubexd 面板](https://github.com/MetaCubeX/metacubexd)和 [zashboard 面板](https://github.com/Zephyruso/zashboard) -6. AdGuard Home Release 版和 Beta 版 +3. sing-box Release 版、Dev 版内核和 sing-box PuerNya 版内核(支持 `outbound_providers` 代理集合) +4. Dashboard 面板:[yacd 面板](https://github.com/haishanh/yacd)、[Yacd-meta 面板](https://github.com/MetaCubeX/Yacd-meta)、[metacubexd 面板](https://github.com/MetaCubeX/metacubexd)和 [zashboard 面板](https://github.com/Zephyruso/zashboard) +5. AdGuard Home Release 版和 Beta 版 **注:** - 1. 本教程中的下载链接以 CPU 架构 ARMv8 为例,请注意修改链接后缀