From 987ab6ee2b9d0c64cb5833ce5154dd315f6fdc45 Mon Sep 17 00:00:00 2001 From: Byron Ruth Date: Sat, 10 Feb 2024 08:34:54 -0500 Subject: [PATCH] Try windows builds Signed-off-by: Byron Ruth --- .github/workflows/preview.yaml | 76 +++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 16 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 8a12ef4..146cc1b 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -10,10 +10,54 @@ env: IMAGE_NAME: "synadia/nats-server" jobs: - linux_2_10: + # linux_2_10: + # #if: ${{ startsWith(github.ref_name, '2.10.') }} + # if: ${{ startsWith(github.ref_name, 'preview-images') }} + # runs-on: ubuntu-latest + # + # permissions: + # contents: read + # + # steps: + # - name: Checkout repository + # uses: actions/checkout@v4 + # + # - name: Log into Docker + # uses: docker/login-action@v3 + # with: + # username: ${{ secrets.DOCKER_USERNAME }} + # password: ${{ secrets.DOCKER_TOKEN }} + # + # # Setting up Docker Buildx with docker-container driver is required + # # at the moment to be able to use a subdirectory with Git context. + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # + # - name: Setup builder + # run: | + # docker buildx create --name builder --bootstrap --use + # + # - name: alpine3.19 + # run: | + # docker buildx build \ + # --platform linux/arm64,linux/arm/v6,linux/arm/v7,linux/amd64,linux/386,linux/s390x \ + # --tag "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-alpine3.19" \ + # --push \ + # ./2.10.x/alpine3.19 + # + # - name: scratch + # run: | + # docker buildx build \ + # --build-arg "BASE_IMAGE=${{ env.IMAGE_NAME }}:${{ github.ref_name }}-alpine3.19" \ + # --platform linux/arm64,linux/arm/v6,linux/arm/v7,linux/amd64,linux/386,linux/s390x \ + # --tag "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-scratch" \ + # --push \ + # ./2.10.x/scratch + # + windows_2_10: #if: ${{ startsWith(github.ref_name, '2.10.') }} if: ${{ startsWith(github.ref_name, 'preview-images') }} - runs-on: ubuntu-latest + runs-on: windows-2019 permissions: contents: read @@ -29,7 +73,7 @@ jobs: password: ${{ secrets.DOCKER_TOKEN }} # Setting up Docker Buildx with docker-container driver is required - # at the moment to be able to use a subdirectory with Git context + # at the moment to be able to use a subdirectory with Git context. - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -37,19 +81,19 @@ jobs: run: | docker buildx create --name builder --bootstrap --use - - name: Alpine image + - name: windowsservercore-1809 run: | - docker buildx build \ - --platform linux/arm64,linux/arm/v6,linux/arm/v7,linux/amd64,linux/386,linux/s390x \ - --tag "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-alpine3.19" \ - --push \ - ./2.10.x/alpine3.19 + docker buildx build ` + --platform windows/amd64 ` + --tag "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-windowsservercore-1809" ` + --push ` + ./2.10.x/windowsservercore-1809 - - name: Scratch image + - name: nanoserver-1809 run: | - docker buildx build \ - --build-arg "BASE_IMAGE=${{ env.IMAGE_NAME }}:${{ github.ref_name }}-alpine3.19" \ - --platform linux/arm64,linux/arm/v6,linux/arm/v7,linux/amd64,linux/386,linux/s390x \ - --tag "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-scratch" \ - --push \ - ./2.10.x/scratch + docker buildx build ` + --build-arg "BASE_IMAGE=${{ env.IMAGE_NAME }}:${{ github.ref_name }}-nanoserver-1809" ` + --platform windows/amd64 ` + --tag "${{ env.IMAGE_NAME }}:${{ github.ref_name }}-windowsservercore-1809" ` + --push ` + ./2.10.x/nanoserver-1809