diff --git a/.github/workflows/ci.yml/ci.yml b/.github/workflows/ci.yml similarity index 64% rename from .github/workflows/ci.yml/ci.yml rename to .github/workflows/ci.yml index 40b793a..4f0c74d 100644 --- a/.github/workflows/ci.yml/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} . + 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 "