From 05b3cdd2ce710d746d567836fbe7abbc202eaa49 Mon Sep 17 00:00:00 2001 From: Constantin Graf Date: Mon, 15 Jul 2024 22:21:37 +0200 Subject: [PATCH] Added ARM build --- .github/workflows/build-private.yml | 6 +++++- .github/workflows/build-public.yml | 28 ++++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-private.yml b/.github/workflows/build-private.yml index 6b4cd5bc..cf2e393e 100644 --- a/.github/workflows/build-private.yml +++ b/.github/workflows/build-private.yml @@ -15,7 +15,7 @@ name: Build - Private jobs: build: runs-on: ubuntu-latest - timeout-minutes: 10 + timeout-minutes: 20 steps: - name: "Check out code" @@ -114,6 +114,9 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=sha,format=long + - name: "Set up QEMU" + uses: docker/setup-qemu-action@v3 + - name: "Set up Docker Buildx" uses: docker/setup-buildx-action@v3 @@ -125,6 +128,7 @@ jobs: DOCKER_FILES_BASE_PATH=docker/prod/ file: docker/prod/Dockerfile push: true + platforms: linux/amd64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha diff --git a/.github/workflows/build-public.yml b/.github/workflows/build-public.yml index ce84a39f..1b2c536a 100644 --- a/.github/workflows/build-public.yml +++ b/.github/workflows/build-public.yml @@ -15,7 +15,17 @@ name: Build - Public jobs: build: runs-on: ubuntu-latest - timeout-minutes: 10 + permissions: + packages: write + contents: read + attestations: write + id-token: write + strategy: + matrix: + platform: + - linux/amd64 + - linux/arm64 + timeout-minutes: 60 steps: - name: "Check out code" @@ -48,18 +58,28 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: "Login to GitHub Container Registry" + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: "Docker meta" id: "meta" uses: docker/metadata-action@v5 with: - images: solidtime/solidtime + images: | + solidtime/solidtime + ghcr.io/${{ github.repository }} tags: | type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} + - name: "Set up QEMU" + uses: docker/setup-qemu-action@v3 + - name: "Set up Docker Buildx" uses: docker/setup-buildx-action@v3 @@ -70,7 +90,7 @@ jobs: file: docker/prod/Dockerfile build-args: | DOCKER_FILES_BASE_PATH=docker/prod/ - platforms: linux/amd64 + platforms: ${{ matrix.platform }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}