From 0e3b7cb3934e000a3dbb9fe343bc01899d4df87d Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 1 Apr 2026 10:27:14 +0800 Subject: [PATCH] perf: update base image --- .github/workflows/build-base-image.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build-base-image.yml b/.github/workflows/build-base-image.yml index 3f8dd31e6e..5e4c55c064 100644 --- a/.github/workflows/build-base-image.yml +++ b/.github/workflows/build-base-image.yml @@ -9,6 +9,13 @@ on: - 'package-lock.json' - 'yarn.lock' - 'Dockerfile-base' + workflow_dispatch: + inputs: + branch: + description: '构建基础镜像所用的分支' + required: true + type: string + default: 'main' jobs: build-and-push: @@ -16,12 +23,15 @@ jobs: steps: - name: Lock Pull Request + if: github.event_name == 'push' run: | curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -d '{"state":"pending", "description":"Action running, merge disabled", "context":"Lock PR"}' \ "https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }}" - name: Checkout repository uses: actions/checkout@v4 + with: + ref: ${{ github.event_name == 'workflow_dispatch' && inputs.branch || github.ref }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -66,6 +76,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Unlock Pull Request + if: github.event_name == 'push' run: | curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -d '{"state":"success", "description":"Action running, merge disabled", "context":"Lock PR"}' \