From 9ca34b540df3a201136bb7c09d9a5762e6d84f94 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 9 Nov 2022 13:32:55 -0500 Subject: [PATCH] - adds support for multi-platform images Signed-off-by: Vincent Biret --- .github/workflows/docker.yml | 4 ++++ CHANGELOG.md | 1 + Dockerfile | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c2a9ce337d..0e0c0cf5e5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -31,15 +31,19 @@ jobs: if: contains(github.ref, 'refs/tags/v') env: BRANCH_NAME: ${{ github.ref }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Push to GitHub Packages - Nightly if: contains(github.ref, 'refs/head/main') uses: docker/build-push-action@v3.2.0 with: push: true + platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,windows/amd64 tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly - name: Push to GitHub Packages - Release if: contains(github.ref, 'refs/tags/v') uses: docker/build-push-action@v3.2.0 with: push: true + platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,windows/amd64 tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index b9558b3620..a2261390fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Fixed container support for MacOS M1. [#1888](https://github.com/microsoft/kiota/issues/1888) - Fixed a bug where array buffers nullability would wrongly be defined for TypeScript. - Fixed a bug where parameter comments would appear in summary tag comments in dotnet. [#1945](https://github.com/microsoft/kiota/issues/1945) - Fixed a bug in PHP generation where request bodies would not serialize single elements properly. [#1937](https://github.com/microsoft/kiota/pull/1937) diff --git a/Dockerfile b/Dockerfile index 6951eb2fc9..fb38907cf1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env WORKDIR /app COPY ./src ./kiota/src WORKDIR /app/kiota RUN dotnet publish ./src/kiota/kiota.csproj -c Release -FROM mcr.microsoft.com/dotnet/runtime:7.0 as runtime +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/runtime:7.0 as runtime WORKDIR /app COPY --from=build-env /app/kiota/src/kiota/bin/Release/net7.0 ./