Skip to content
Open
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
3 changes: 2 additions & 1 deletion .github/workflows/check-windows-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- '.github/workflows/publish-alloy.yml'
- '.github/workflows/publish-alloy-devel.yml'
- '.github/workflows/release-publish-alloy-artifacts.yml'
- '.github/workflows/publish-alloy-windows.yml'
pull_request:
paths:
- 'Dockerfile.windows'
Expand All @@ -18,7 +19,7 @@ on:
- '.github/workflows/publish-alloy.yml'
- '.github/workflows/publish-alloy-devel.yml'
- '.github/workflows/release-publish-alloy-artifacts.yml'

- '.github/workflows/publish-alloy-windows.yml'
permissions:
contents: read

Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ jobs:
windows:
runs-on: windows-2022
steps:
- name: Wait for Docker to be ready
run: |
$retries = 0
$maxRetries = 30
while ($retries -lt $maxRetries) {
docker info 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Host "Docker is ready."
exit 0
}
$retries++
Write-Host "Waiting for Docker to be ready... (attempt $retries/$maxRetries)"
Start-Sleep -Seconds 2
}
Write-Host "Docker did not become ready after $maxRetries attempts."
exit 1

- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/publish-alloy-windows.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's official advice to try starting the docker service:

      - name: Docker issue workaround
        id: docker-workaround
        run: |
          $dockerState = Get-Service -Name "docker"
          if ($dockerState.Status -ne "Running") {
            Start-Service -Name "docker"
          }

Let's switch to that?

Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,23 @@ jobs:
os: [windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Wait for Docker to be ready
run: |
$retries = 0
$maxRetries = 30
while ($retries -lt $maxRetries) {
docker info 2>$null
if ($LASTEXITCODE -eq 0) {
Write-Host "Docker is ready."
exit 0
}
$retries++
Write-Host "Waiting for Docker to be ready... (attempt $retries/$maxRetries)"
Start-Sleep -Seconds 2
}
Write-Host "Docker did not become ready after $maxRetries attempts."
exit 1

# This step needs to run before "Checkout code".
# That's because it generates a new file.
# We don't want this file to end up in the repo directory.
Expand Down
Loading