From 3d01ec827d7d947733d460d88f72629ca662d1f9 Mon Sep 17 00:00:00 2001 From: juewuy Date: Tue, 20 Jan 2026 19:09:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E4=BF=AE=E6=94=B9=20=20=20=20=20=20?= =?UTF-8?q?=20=20.github/workflows/core=5Feasy=5Fupdate.yaml=20=E5=B7=B2?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=20=20=20=20=20=20=20.github/workflows/upd?= =?UTF-8?q?ate=5Fsingbox=5Fcore.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/core_easy_update.yaml | 30 ++++++++++++---------- .github/workflows/update_singbox_core.yaml | 2 +- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/core_easy_update.yaml b/.github/workflows/core_easy_update.yaml index 8df4e888..99012f31 100644 --- a/.github/workflows/core_easy_update.yaml +++ b/.github/workflows/core_easy_update.yaml @@ -9,25 +9,27 @@ on: type: string jobs: - get_meta_version: + get_version: runs-on: ubuntu-latest outputs: - meta_version: ${{ steps.meta.outputs.version }} + version: ${{ steps.get_version.outputs.version }} steps: - - id: meta + - id: get_version run: | - # 访问 GitHub API 获取最新 Release 的 Tag 名 - latest_tag=$(curl -s https://api.github.com/repos/MetaCubeX/mihomo/releases/latest | jq -r .tag_name) + [ "${{ inputs.tag1 }}" = meta ] && repo="MetaCubeX/mihomo" + [ "${{ inputs.tag1 }}" = singbox ] && repo="SagerNet/sing-box" + [ "${{ inputs.tag1 }}" = singboxr ] && repo="SagerNet/sing-box" + latest_tag=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | jq -r .tag_name) echo "version=$latest_tag" >> $GITHUB_OUTPUT update_meta_upx: if: github.event.inputs.tag1 == 'meta' - needs: get_meta_version + needs: get_version permissions: write-all uses: juewuy/ShellCrash/.github/workflows/update_meta_core.yaml@dev with: tag1: MetaCubeX/mihomo - tag2: ${{ needs.get_meta_version.outputs.meta_version }} + tag2: ${{ needs.get_version.outputs.version }} tag4: meta tag5: "" tag6: upx @@ -35,12 +37,12 @@ jobs: update_meta_tar: if: github.event.inputs.tag1 == 'meta' - needs: [get_meta_version, update_meta_upx] + needs: [get_version, update_meta_upx] permissions: write-all uses: juewuy/ShellCrash/.github/workflows/update_meta_core.yaml@dev with: tag1: MetaCubeX/mihomo - tag2: ${{ needs.get_meta_version.outputs.meta_version }} + tag2: ${{ needs.get_version.outputs.version }} tag4: meta tag5: "" tag6: tar.gz @@ -48,11 +50,12 @@ jobs: update_singboxr_upx: if: github.event.inputs.tag1 == 'singboxr' + needs: get_version permissions: write-all uses: juewuy/ShellCrash/.github/workflows/update_singbox_core.yaml@dev with: tag1: reF1nd/sing-box - tag2: reF1nd-main + tag2: ${{ needs.get_version.outputs.version }} tag4: singboxr tag5: with_quic,with_utls,with_clash_api tag6: upx @@ -60,12 +63,12 @@ jobs: update_singboxr_tar: if: github.event.inputs.tag1 == 'singboxr' - needs: update_singboxr_upx + needs: [get_version, update_singboxr_upx] permissions: write-all uses: juewuy/ShellCrash/.github/workflows/update_singbox_core.yaml@dev with: tag1: reF1nd/sing-box - tag2: reF1nd-main + tag2: ${{ needs.get_version.outputs.version }} tag4: singboxr tag5: with_gvisor,with_quic,with_wireguard,with_utls,with_clash_api,with_tailscale tag6: tar.gz @@ -73,11 +76,12 @@ jobs: update_singbox_upx: if: github.event.inputs.tag1 == 'singbox' + needs: get_version permissions: write-all uses: juewuy/ShellCrash/.github/workflows/update_singbox_core.yaml@dev with: tag1: SagerNet/sing-box - tag2: main + tag2: ${{ needs.get_version.outputs.version }} tag4: singbox tag5: with_quic,with_utls,with_clash_api tag6: upx diff --git a/.github/workflows/update_singbox_core.yaml b/.github/workflows/update_singbox_core.yaml index 3e6e2e91..32f805fe 100644 --- a/.github/workflows/update_singbox_core.yaml +++ b/.github/workflows/update_singbox_core.yaml @@ -88,7 +88,7 @@ jobs: git fetch --tags sekai version=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag) [ -z "$version" ] && version=${{ inputs.tag2 }} - version=$(echo $version | sed 's/-reF1nd//') + version=$(echo $version | sed 's/-.*$//') echo version=$version >> $GITHUB_OUTPUT if [ -z "$TAGS" ];then if [ "$REPO" = 'SagerNet/sing-box' ];then