From d879bdcdc42443ccb8fb13f4c3df783a4d56c887 Mon Sep 17 00:00:00 2001 From: bvzrays <1372627285@qq.com> Date: Wed, 2 Dec 2026 14:06:20 +0800 Subject: [PATCH] ci: follow host Go version in market workflows --- .github/workflows/pr-check.yml | 18 +++++++++++++----- .github/workflows/publish.yml | 17 ++++++++++++----- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index ccb4705..fd96c22 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -3,6 +3,7 @@ name: PR Plugin Gate on: pull_request: paths: + - '.github/workflows/**' - 'registry.json' - 'withdrawn.json' - 'scripts/**' @@ -30,17 +31,24 @@ jobs: count=$(node -e "const r = JSON.parse(require('fs').readFileSync('registry.json','utf8')); console.log((r.plugins||[]).length)") echo "count=$count" >> "$GITHUB_OUTPUT" - - name: Setup Go for reims-go doctor CLI + - name: Checkout Reims-Go CLI source + if: steps.reg.outputs.count != '0' + uses: actions/checkout@v4 + with: + repository: Nwflower/Reims-Go + ref: main + path: reims-go + + - name: Setup Go from Reims-Go go.mod if: steps.reg.outputs.count != '0' uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version-file: reims-go/go.mod - - name: Build headless reims-go CLI from Nwflower/Reims-Go + - name: Build headless reims-go CLI if: steps.reg.outputs.count != '0' run: | - git clone --depth 1 https://github.com/Nwflower/Reims-Go.git /tmp/reims-go-src - cd /tmp/reims-go-src + cd reims-go mkdir -p cmd/reims-doctor cat <<'EOF' > cmd/reims-doctor/main.go package main diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4cc0ca8..18ac330 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,17 +36,24 @@ jobs: count=$(node -e "const r = JSON.parse(require('fs').readFileSync('registry.json','utf8')); console.log((r.plugins||[]).length)") echo "count=$count" >> "$GITHUB_OUTPUT" - - name: Setup Go for reims-go doctor CLI + - name: Checkout Reims-Go CLI source + if: steps.reg.outputs.count != '0' + uses: actions/checkout@v4 + with: + repository: Nwflower/Reims-Go + ref: main + path: reims-go + + - name: Setup Go from Reims-Go go.mod if: steps.reg.outputs.count != '0' uses: actions/setup-go@v5 with: - go-version: '1.24' + go-version-file: reims-go/go.mod - - name: Build headless reims-go CLI from Nwflower/Reims-Go + - name: Build headless reims-go CLI if: steps.reg.outputs.count != '0' run: | - git clone --depth 1 https://github.com/Nwflower/Reims-Go.git /tmp/reims-go-src - cd /tmp/reims-go-src + cd reims-go mkdir -p cmd/reims-doctor cat <<'EOF' > cmd/reims-doctor/main.go package main