From ab90c299cd6b69c725238e6b08128e90112ebc8d Mon Sep 17 00:00:00 2001 From: Paul Crooks Date: Wed, 15 May 2024 08:53:37 +0000 Subject: [PATCH 1/2] Add CI --- .github/workflows/{ci.yml => }/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{ci.yml => }/ci.yml (84%) diff --git a/.github/workflows/ci.yml/ci.yml b/.github/workflows/ci.yml similarity index 84% rename from .github/workflows/ci.yml/ci.yml rename to .github/workflows/ci.yml index 40b793a..89af113 100644 --- a/.github/workflows/ci.yml/ci.yml +++ b/.github/workflows/ci.yml @@ -18,4 +18,4 @@ jobs: run: | export IMAGE_TAG=$(echo "${GITHUB_HEAD_REF}" | sed "s/\//-/g")-2022 echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV - docker build -t windows-event-gen:${IMAGE_TAG} . + docker build -t windows-event-gen:${IMAGE_TAG} -f Dockerfile.2022 . From 3d65e09f87a162d1b148191ad2ba40dd94bdd84c Mon Sep 17 00:00:00 2001 From: Paul Crooks Date: Wed, 15 May 2024 09:02:25 +0000 Subject: [PATCH 2/2] Add Server 2019 --- .github/workflows/ci.yml | 9 ++++++--- Dockerfile.2022 => Dockerfile | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) rename Dockerfile.2022 => Dockerfile (63%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89af113..4f0c74d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,10 @@ on: jobs: build-image: - runs-on: windows-2022 + strategy: + matrix: + os: [2019, 2022] + runs-on: windows-${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v4 @@ -16,6 +19,6 @@ jobs: env: GITHUB_HEAD_REF: ${{ github.head_ref }} run: | - export IMAGE_TAG=$(echo "${GITHUB_HEAD_REF}" | sed "s/\//-/g")-2022 + export IMAGE_TAG=$(echo "${GITHUB_HEAD_REF}" | sed "s/\//-/g")-${{ matrix.os }} echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV - docker build -t windows-event-gen:${IMAGE_TAG} -f Dockerfile.2022 . + docker build -t windows-event-gen:${IMAGE_TAG} --build-arg SERVER_VERSION=${{ matrix.os }} . diff --git a/Dockerfile.2022 b/Dockerfile similarity index 63% rename from Dockerfile.2022 rename to Dockerfile index 9e3a7c3..c78f5fe 100644 --- a/Dockerfile.2022 +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM mcr.microsoft.com/powershell:7.4-windowsservercore-ltsc2022 +ARG SERVER_VERSION + +FROM mcr.microsoft.com/powershell:7.4-windowsservercore-ltsc${SERVER_VERSION} LABEL maintainer="Paul Crooks "