6060 contents : read
6161 steps :
6262 - name : Checkout code
63- uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
63+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6464 with :
6565 ref : ${{ inputs.ref }}
6666
9898 runs-on : ${{ (contains(matrix.platform, 'arm') && 'ubuntu-22.04-arm') || 'ubuntu-latest' }}
9999 steps :
100100 - name : Checkout code
101- uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
101+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
102102 with :
103103 ref : ${{ inputs.ref }}
104104 token : ${{ secrets.token }}
@@ -107,7 +107,7 @@ jobs:
107107 uses : docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
108108
109109 - name : Log in to the Container registry
110- uses : docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4 .0
110+ uses : docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6 .0
111111 with :
112112 registry : ${{ inputs.registry }}
113113 username : ${{ github.actor }}
@@ -183,7 +183,7 @@ jobs:
183183 uses : docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
184184
185185 - name : Log in to the Container registry
186- uses : docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4 .0
186+ uses : docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6 .0
187187 with :
188188 registry : ${{ inputs.registry }}
189189 username : ${{ github.actor }}
@@ -235,7 +235,7 @@ jobs:
235235 uses : docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
236236
237237 - name : Log in to the Container registry
238- uses : docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4 .0
238+ uses : docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6 .0
239239 with :
240240 registry : ${{ inputs.registry }}
241241 username : ${{ github.actor }}
@@ -265,7 +265,7 @@ jobs:
265265 packages : read
266266 steps :
267267 - name : Log in to the Container registry
268- uses : docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4 .0
268+ uses : docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6 .0
269269 with :
270270 registry : ${{ inputs.registry }}
271271 username : ${{ inputs.username }}
@@ -297,7 +297,7 @@ jobs:
297297 packages : read
298298 steps :
299299 - name : Log in to the Container registry
300- uses : docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4 .0
300+ uses : docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6 .0
301301 with :
302302 registry : ${{ inputs.registry }}
303303 username : ${{ inputs.username }}
@@ -381,33 +381,43 @@ jobs:
381381
382382 # This takes a long time...
383383 call-build-windows-container :
384- name : Windows container images
384+ name : Windows ${{ matrix.windows- container-type }} ${{ matrix.windows-base-version }} container image
385385 runs-on : windows-${{ matrix.windows-base-version }}
386386 environment : ${{ inputs.environment }}
387387 needs :
388388 - call-build-images-meta
389389 strategy :
390390 fail-fast : true
391391 matrix :
392- windows-base-version :
393- - ' 2022'
394- - ' 2025'
392+ include :
393+ - windows-base-version : ' 2022'
394+ windows-container-type : servercore
395+ dockerfile : Dockerfile.windows
396+ image-tag-prefix : windows-2022
397+ - windows-base-version : ' 2025'
398+ windows-container-type : servercore
399+ dockerfile : Dockerfile.windows
400+ image-tag-prefix : windows-2025
401+ - windows-base-version : ' 2025'
402+ windows-container-type : nanoserver
403+ dockerfile : Dockerfile.windows.nano
404+ image-tag-prefix : windows-nano-2025
395405 permissions :
396406 contents : read
397407 packages : write
398408 env :
399- IMAGE : ${{ inputs.registry }}/${{ inputs.image }}:windows- ${{ matrix.windows-base-version }}-${{ inputs.version }}
409+ IMAGE : ${{ inputs.registry }}/${{ inputs.image }}:${{ matrix.image-tag-prefix }}-${{ inputs.version }}
400410 steps :
401411 - name : Checkout repository
402- uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
412+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
403413 with :
404414 ref : ${{ inputs.ref }}
405415
406416 # - name: Set up Docker Buildx
407417 # uses: docker/setup-buildx-action@v4
408418
409419 - name : Log in to the Container registry
410- uses : docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4 .0
420+ uses : docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6 .0
411421 with :
412422 registry : ${{ inputs.registry }}
413423 username : ${{ inputs.username }}
@@ -438,21 +448,45 @@ jobs:
438448 run : |
439449 VERSION=$(gh release list --json tagName,isLatest --jq '.[] | select(.isLatest)|.tagName | sub("^v"; "")')
440450 echo VERSION="$VERSION"
441- docker pull ${{ inputs.registry }}/${{ inputs.image }}:windows- ${{ matrix.windows-base-version }}-$VERSION
451+ docker pull ${{ inputs.registry }}/${{ inputs.image }}:${{ matrix.image-tag-prefix }}-$VERSION
442452 shell : bash
443453 env :
444454 GH_TOKEN : ${{ secrets.token }}
445455
446456 - name : Build the production images
447457 run : |
448- docker build -t $IMAGE --build-arg FLB_NIGHTLY_BUILD=${{ inputs.unstable }} --build-arg WINDOWS_VERSION=ltsc${{ matrix.windows-base-version }} -f ./dockerfiles/Dockerfile.windows .
458+ docker build -t $IMAGE --build-arg FLB_NIGHTLY_BUILD=${{ inputs.unstable }} --build-arg WINDOWS_VERSION=ltsc${{ matrix.windows-base-version }} -f ./dockerfiles/${{ matrix.dockerfile }} .
449459 shell : bash
450460
451461 - name : Sanity check of the production images
452462 run : |
453463 docker run --rm -t $IMAGE --help
454464 shell : bash
455465
466+ - name : Sanity check the Nano Server default configuration
467+ if : matrix.windows-container-type == 'nanoserver'
468+ run : |
469+ $containerName = "fluent-bit-nano-${{ matrix.windows-base-version }}"
470+
471+ try {
472+ docker run --detach --name $containerName $env:IMAGE
473+ Start-Sleep -Seconds 5
474+
475+ $running = docker inspect --format '{{.State.Running}}' $containerName
476+ docker logs $containerName
477+
478+ if ($running -ne "true") {
479+ throw "Nano Server container did not remain running"
480+ }
481+ }
482+ finally {
483+ $containerId = docker ps --all --quiet --filter "name=^/${containerName}$"
484+ if ($containerId) {
485+ docker rm --force $containerName | Out-Null
486+ }
487+ }
488+ shell : pwsh
489+
456490 - name : Push the production images
457491 if : inputs.push
458492 run : |
0 commit comments