From da94d6b45138f3219507ee70c5d2788ca227e8c4 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 10 Feb 2026 11:22:32 -0800 Subject: [PATCH] Add manual latest-image trigger inputs for ref and variant --- .github/workflows/container_latest.yml | 32 ++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/container_latest.yml b/.github/workflows/container_latest.yml index 6d3deb02a..9910eadc4 100644 --- a/.github/workflows/container_latest.yml +++ b/.github/workflows/container_latest.yml @@ -4,7 +4,21 @@ on: push: tags: - '*' - workflow_dispatch: {} + workflow_dispatch: + inputs: + source_ref: + description: 'Git ref to build (branch, tag, or commit SHA)' + required: true + default: 'master' + variant: + description: 'Variant to build manually' + required: true + type: choice + default: all + options: + - all + - standard + - large_disk permissions: contents: read @@ -12,6 +26,10 @@ permissions: jobs: build: runs-on: ubuntu-latest + if: | + github.event_name != 'workflow_dispatch' || + github.event.inputs.variant == 'all' || + github.event.inputs.variant == matrix.variant strategy: matrix: platform: [amd64, arm64, arm, 386] @@ -20,6 +38,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.source_ref || github.ref }} - name: Free Disk Space run: | echo "Available disk space before cleanup:" @@ -116,13 +136,21 @@ jobs: create-manifest: runs-on: ubuntu-latest needs: [build] - if: github.event_name != 'pull_request' + if: | + github.event_name != 'pull_request' && + ( + github.event_name != 'workflow_dispatch' || + github.event.inputs.variant == 'all' || + github.event.inputs.variant == matrix.variant + ) strategy: matrix: variant: [standard, large_disk] steps: - name: Checkout uses: actions/checkout@v6 + with: + ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.source_ref || github.ref }} - name: Configure variant id: config