Skip to content
Merged
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
38 changes: 38 additions & 0 deletions .github/workflows/pr-image-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- synchronize
paths:
- 'dockerfiles/Dockerfile'
- 'dockerfiles/Dockerfile.windows'
- 'conf/**'

workflow_dispatch:
Expand Down Expand Up @@ -79,3 +80,40 @@ jobs:
# Ensure we disable buildkit
DOCKER_BUILDKIT: 0
shell: bash
pr-image-tests-build-windows-images:
name: PR - Docker windows build test, windows 2019 and 2022
runs-on: windows-${{ matrix.windows-base-version }}
strategy:
fail-fast: true
matrix:
windows-base-version:
# https://github.com/fluent/fluent-bit/blob/1d366594a889624ec3003819fe18588aac3f17cd/dockerfiles/Dockerfile.windows#L3
- '2019'
- '2022'
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Extract metadata from Github
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ github.repository }}/pr-${{ github.event.pull_request.number }}
tags: |
type=sha
flavor: |
suffix=-windows-${{ matrix.windows-base-version }}

- name: Build the windows images
id: build
run: |
docker build -t ${{ steps.meta.outputs.tags }} --build-arg WINDOWS_VERSION=ltsc${{ matrix.windows-base-version }} -f ./dockerfiles/Dockerfile.windows .

- name: Sanity check it runs
# We do this for a simple check of dependencies
run: |
docker run --rm -t ${{ steps.meta.outputs.tags }} --help
shell: bash

1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ RUN Start-Process /local/vc_redist.x64.exe -ArgumentList '/install', '/quiet', '

# Install Chocolatey and OpenSSL: https://github.com/StefanScherer/dockerfiles-windows/blob/main/openssl/Dockerfile
ENV chocolateyUseWindowsCompression false
ENV chocolateyVersion '1.4.0'
RUN iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); `
choco feature disable --name showDownloadProgress ; `
choco install -y openssl;
Expand Down