Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/build-test-and-push-windows-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -67,11 +69,22 @@ jobs:
tag=${tag_without_os}-${INPUT_OS}${MATRIX_EDITION}
EOF

- name: Login to Docker Hub
# 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:
username: ${{ secrets.GPUCIBOT_DOCKERHUB_USER || vars.DOCKERHUB_USER }}
password: ${{ secrets.GPUCIBOT_DOCKERHUB_TOKEN || secrets.DOCKERHUB_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
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}

Expand All @@ -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

Expand All @@ -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:
Expand All @@ -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 }}"