Skip to content

Commit

Permalink
Try windows builds
Browse files Browse the repository at this point in the history
Signed-off-by: Byron Ruth <[email protected]>
  • Loading branch information
bruth committed Feb 10, 2024
1 parent 2f366e3 commit 987ab6e
Showing 1 changed file with 60 additions and 16 deletions.
76 changes: 60 additions & 16 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,27 +73,27 @@ 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

- name: Setup builder
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

0 comments on commit 987ab6e

Please sign in to comment.