From d77bc2f7c527f4c8c1f28f4252bf8a776da78399 Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Mon, 31 Aug 2026 15:00:59 -0500 Subject: [PATCH 1/3] Enable reusable Windows image publishing --- .../build-test-and-push-windows-image.yml | 11 +++++++++++ .github/workflows/release-windows.yml | 17 ++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-and-push-windows-image.yml b/.github/workflows/build-test-and-push-windows-image.yml index 368016d38..f1152c5dd 100644 --- a/.github/workflows/build-test-and-push-windows-image.yml +++ b/.github/workflows/build-test-and-push-windows-image.yml @@ -39,6 +39,8 @@ jobs: - name: Checkout ${{ github.repository }} uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: + repository: ${{ job.workflow_repository }} + ref: ${{ job.workflow_sha }} fetch-depth: 0 persist-credentials: false @@ -68,11 +70,20 @@ jobs: EOF - name: Login to Docker Hub + if: ${{ ! startsWith(inputs.repo, 'ghcr.io/') }} uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4 with: username: ${{ secrets.GPUCIBOT_DOCKERHUB_USER || vars.DOCKERHUB_USER }} password: ${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN || secrets.DOCKERHUB_TOKEN }} + - name: Login to GHCR + if: ${{ startsWith(inputs.repo, 'ghcr.io/') }} + uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ github.token }} + - name: Build ${{ steps.info.outputs.tag }} uses: ./.github/actions/build-windows-image with: diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml index 53fa85bb2..e853a12ce 100644 --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -5,7 +5,19 @@ concurrency: cancel-in-progress: true on: + workflow_call: + inputs: + repo: + description: Image repository to publish to + required: true + type: string workflow_dispatch: + inputs: + repo: + description: Image repository to publish to (defaults to Docker Hub) + required: false + default: "" + type: string permissions: {} @@ -22,6 +34,8 @@ jobs: - name: Checkout ${{ github.repository }} uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: + repository: ${{ job.workflow_repository }} + ref: ${{ job.workflow_sha }} fetch-depth: 0 persist-credentials: false @@ -37,6 +51,7 @@ jobs: needs: image-matrix permissions: contents: read + packages: write secrets: inherit # zizmor: ignore[secrets-inherit] uses: ./.github/workflows/build-test-and-push-windows-image.yml strategy: @@ -47,4 +62,4 @@ jobs: os: "${{ matrix.os }}" features: "${{ toJSON(matrix.features) }}" container_env: "${{ toJSON(matrix.env) }}" - repo: "${{ vars.DOCKERHUB_REPOSITORY || github.repository }}" + repo: "${{ inputs.repo || vars.DOCKERHUB_REPOSITORY || github.repository }}" From a7a1c600c326bb85c7420c5c671946eb433fbb80 Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Mon, 31 Aug 2026 18:01:59 -0500 Subject: [PATCH 2/3] Consolidate container registry login --- .../build-test-and-push-windows-image.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-test-and-push-windows-image.yml b/.github/workflows/build-test-and-push-windows-image.yml index f1152c5dd..46e85d142 100644 --- a/.github/workflows/build-test-and-push-windows-image.yml +++ b/.github/workflows/build-test-and-push-windows-image.yml @@ -69,20 +69,12 @@ jobs: tag=${tag_without_os}-${INPUT_OS}${MATRIX_EDITION} EOF - - name: Login to Docker Hub - if: ${{ ! startsWith(inputs.repo, 'ghcr.io/') }} + - name: Login to container registry uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4 with: - username: ${{ secrets.GPUCIBOT_DOCKERHUB_USER || vars.DOCKERHUB_USER }} - password: ${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN || secrets.DOCKERHUB_TOKEN }} - - - name: Login to GHCR - if: ${{ startsWith(inputs.repo, 'ghcr.io/') }} - uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ github.token }} + registry: ${{ case(startsWith(inputs.repo, 'ghcr.io/'), 'ghcr.io', 'docker.io') }} + username: ${{ case(startsWith(inputs.repo, 'ghcr.io/'), github.actor, secrets.GPUCIBOT_DOCKERHUB_USER || vars.DOCKERHUB_USER) }} + password: ${{ case(startsWith(inputs.repo, 'ghcr.io/'), github.token, secrets.GPUCIBOT_DOCKERHUB_TOKEN || secrets.DOCKERHUB_TOKEN) }} - name: Build ${{ steps.info.outputs.tag }} uses: ./.github/actions/build-windows-image From f0d3eebdef13157c4f6bd5ae8462c0194beac82f Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Tue, 1 Sep 2026 22:01:50 -0500 Subject: [PATCH 3/3] Ensure Docker runs on hosted Windows runners --- .../workflows/build-test-and-push-windows-image.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build-test-and-push-windows-image.yml b/.github/workflows/build-test-and-push-windows-image.yml index 46e85d142..9d8b7f2ae 100644 --- a/.github/workflows/build-test-and-push-windows-image.yml +++ b/.github/workflows/build-test-and-push-windows-image.yml @@ -69,6 +69,16 @@ jobs: tag=${tag_without_os}-${INPUT_OS}${MATRIX_EDITION} EOF + # https://github.com/actions/runner-images/issues/13729 + - if: runner.environment != 'self-hosted' + name: Ensure Docker Engine is running + shell: powershell + run: | + $dockerState = Get-Service -Name docker + if ($dockerState.Status -ne 'Running') { + Start-Service -Name docker + } + - name: Login to container registry uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4 with: