From 56ebe59fb899d032bcf19a0238e305e97343a008 Mon Sep 17 00:00:00 2001 From: Jack Kelly Date: Tue, 2 Jan 2024 14:38:02 +0000 Subject: [PATCH] chore: build release images for amd64 and arm64 Added a cache Build containers for both architectures Drop old arm builds from goreleaser for now --- .github/workflows/release.yaml | 19 +++++++++++++++++++ .goreleaser.yaml | 7 +++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b19346e1..746258f4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,11 +13,25 @@ jobs: build-push-docker-images: runs-on: ubuntu-latest steps: + - name: Cache container layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}${{ matrix.containers.suffix }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}${{ matrix.containers.suffix }}-buildx- + - name: Checkout source code uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -62,6 +76,11 @@ jobs: severity: 'CRITICAL,HIGH' trivyignores: './.trivy-config/.trivyignore' + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + platforms: linux/amd64,linux/arm64 + - name: Build and push dev image ## should use cache image from the previous step uses: docker/build-push-action@v5 with: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index fc51c43e..aaaf2458 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -14,11 +14,10 @@ builds: - windows goarch: - amd64 - - arm - arm64 - goarm: - - 6 - - 7 + ignore: + - goos: darwin + goarch: arm main: ./cmd/simulator/main.go binary: simulator archives: