From 312b1fac2015833d913cd8b9d378c285f3cb3c44 Mon Sep 17 00:00:00 2001 From: imengying Date: Wed, 12 Aug 2026 13:54:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96linux=E7=AB=AF=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 21 ++++++++++++++++++--- README.md | 3 ++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf19e4e..8a2e50c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,11 +101,26 @@ jobs: mkdir -p release cp "target/agent/${{ matrix.target }}/release/nodeflare-agent${{ matrix.extension }}" "release/${{ matrix.asset }}" chmod +x "release/${{ matrix.asset }}" - - name: Verify Agent version with cross - if: matrix.cross + - name: Install ARM64 emulator + if: matrix.target == 'aarch64-unknown-linux-musl' + run: | + sudo apt-get update + sudo apt-get install --yes --no-install-recommends qemu-user-static + - name: Verify Linux Agent version + if: matrix.cross && matrix.target == 'x86_64-unknown-linux-musl' shell: bash run: | - version_output=$(CROSS_CONFIG=Cross.toml cross run --manifest-path agent/Cargo.toml --release --locked --target ${{ matrix.target }} -- --version) + version_output=$("release/${{ matrix.asset }}" --version) + actual_version="${version_output##* }" + if [ "$actual_version" != "${{ needs.metadata.outputs.version }}" ]; then + echo "Agent version $actual_version does not match tag ${{ needs.metadata.outputs.version }}" >&2 + exit 1 + fi + - name: Verify Linux ARM64 Agent version + if: matrix.target == 'aarch64-unknown-linux-musl' + shell: bash + run: | + version_output=$(qemu-aarch64-static "release/${{ matrix.asset }}" --version) actual_version="${version_output##* }" if [ "$actual_version" != "${{ needs.metadata.outputs.version }}" ]; then echo "Agent version $actual_version does not match tag ${{ needs.metadata.outputs.version }}" >&2 diff --git a/README.md b/README.md index 24a03ea..a59c3fb 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ ## 部署到 Cloudflare 1. Fork 本仓库并打开 [Workers & Pages](https://dash.cloudflare.com/?to=/:account/workers-and-pages/create),选择 **Import a repository** 后连接仓库。 -2. 在创建页展开 **高级设置**,按下表添加变量后部署。仓库已包含 Worker、前端和 `nodeflare` D1 配置。 +2. 部署命令修改为 `bun run deploy`。 +3. 在 **高级设置** 中填写下表变量后部署。 | 变量 | 必填/可选 | 说明 | | --- | ---: | --- |