From 2dd8f0994a98ce49962b54a2bb49447435ea1de2 Mon Sep 17 00:00:00 2001 From: Zhengchen Tao Date: Sat, 2 May 2026 16:02:54 +0800 Subject: [PATCH] =?UTF-8?q?build-image=20workflow=20=E8=AE=BE=20BUILD=5FPI?= =?UTF-8?q?PELINE=3D1=20=E8=B7=B3=E8=BF=87=E6=B4=BB=20API=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pkg/exchangerates 里 TestExchangeRatesApiLatestExchangeRateHandler_* 是依赖第三方 API(Bank of Canada / 乌兹别克央行 / 等)的活测试。 upstream Dockerfile 设了 ARG BUILD_PIPELINE,测试代码看到 BUILD_PIPELINE=1 && CHECK_3RD_API!=1 时 return nil 早退。 我们 workflow 之前没传这个 arg,所以默认全跑,国内访问加拿大/ 乌兹别克 API 直接超时拉飞 build。对齐 upstream 的 GH Actions 默认值(.github/actions/build-linux-docker-and-package/action.yml line 91 也是 BUILD_PIPELINE=1)。 Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitea/workflows/build-image.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitea/workflows/build-image.yml b/.gitea/workflows/build-image.yml index b492ae48..cb389031 100644 --- a/.gitea/workflows/build-image.yml +++ b/.gitea/workflows/build-image.yml @@ -53,6 +53,12 @@ jobs: with: context: . push: true + # 上游 Dockerfile 用 BUILD_PIPELINE 作为 CI 跳过开关: + # 设为 "1" 时 pkg/exchangerates 跳过依赖第三方 API 的活测试 + # (加拿大银行/乌兹别克央行 API 国内不稳,跑就超时) + # CHECK_3RD_API 留空 → 三方 API 测试不跑;想跑设 "1" + build-args: | + BUILD_PIPELINE=1 tags: | git.zhengchentao.win/dev/ezbookkeeping:${{ steps.meta.outputs.image_tag }} git.zhengchentao.win/dev/ezbookkeeping:latest \ No newline at end of file