diff --git a/.github/workflows/dockerhub-tags.yml b/.github/workflows/dockerhub-tags.yml index ca5215bb2..38c44856f 100644 --- a/.github/workflows/dockerhub-tags.yml +++ b/.github/workflows/dockerhub-tags.yml @@ -11,30 +11,38 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Log in to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push TzKT Sync image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . + platforms: linux/amd64,linux/arm64 file: Tzkt.Sync/Dockerfile push: true tags: bakingbad/tzkt-sync:${{ env.RELEASE_VERSION }} - + - name: Build and push TzKT API image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . + platforms: linux/amd64,linux/arm64 file: Tzkt.Api/Dockerfile push: true tags: bakingbad/tzkt-api:${{ env.RELEASE_VERSION }} \ No newline at end of file diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index cc4fc67a0..0b8dfc091 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -13,24 +13,32 @@ jobs: - name: Check out the repo uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Log in to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push TzKT Sync image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . + platforms: linux/amd64,linux/arm64 file: Tzkt.Sync/Dockerfile push: true tags: bakingbad/tzkt-sync:latest - + - name: Build and push TzKT API image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . + platforms: linux/amd64,linux/arm64 file: Tzkt.Api/Dockerfile push: true tags: bakingbad/tzkt-api:latest diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml index 3e45c6344..17ca2ee97 100644 --- a/.github/workflows/ghcr.yml +++ b/.github/workflows/ghcr.yml @@ -19,13 +19,13 @@ jobs: DOCKER_IMAGE_BASE: ${{ github.repository }} steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Log in to the registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ${{ env.DOCKER_REGISTRY }} username: ${{ github.actor }} @@ -40,7 +40,7 @@ jobs: images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}-api - name: API image build & push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . file: Tzkt.Api/Dockerfile @@ -59,7 +59,7 @@ jobs: images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_BASE }}-sync - name: Sync image build & push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . file: Tzkt.Sync/Dockerfile diff --git a/Tzkt.Api/Dockerfile b/Tzkt.Api/Dockerfile index 7593d753b..30794dc6a 100644 --- a/Tzkt.Api/Dockerfile +++ b/Tzkt.Api/Dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /app COPY . . RUN cd Tzkt.Api && dotnet publish -o output -FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime ENV ASPNETCORE_URLS=http://+:5000 RUN groupadd --gid 1000 tzkt \ && useradd --gid tzkt --no-create-home --uid 1000 tzkt diff --git a/Tzkt.Sync/Dockerfile b/Tzkt.Sync/Dockerfile index 0241012e8..894f4c5f7 100644 --- a/Tzkt.Sync/Dockerfile +++ b/Tzkt.Sync/Dockerfile @@ -1,9 +1,9 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /app COPY . . RUN cd Tzkt.Sync && dotnet publish -o output -FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:7.0 AS runtime RUN groupadd --gid 1000 tzkt \ && useradd --gid tzkt --no-create-home --uid 1000 tzkt WORKDIR /app