From 1e0aa55e9324b43202224bcaf5aa8dfd82e1e3bc Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sun, 23 Jul 2023 15:59:13 -0600 Subject: [PATCH] Fix build --- .github/workflows/ci.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ef492a705..66cbea55c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,24 +44,30 @@ jobs: run: make version - name: Create short sha run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV - - uses: docker/metadata-action@v4 - id: metadata - with: - images: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }} - # avoid overwriting the latest tag because metadata-action does not add a suffix to it - flavor: latest=false,suffix=-${{ matrix.platform }} # The majority of users running arm64 are rpi users, so the rpi # build should be the primary arm64 image - - name: Build and push standard build + - name: Build and push amd64 standard build + uses: docker/build-push-action@v4 + with: + context: . + file: docker/main/Dockerfile + push: true + platforms: linux/amd64 + target: frigate + tags: | + ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-amd64 + cache-from: type=gha + cache-to: type=gha,mode=max + - name: Build and push arm64 standard build uses: docker/build-push-action@v4 with: context: . file: docker/main/Dockerfile push: true - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 target: frigate tags: | - ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }} + ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-standard-arm64 cache-from: type=gha cache-to: type=gha,mode=max - name: Build and push RPi build @@ -88,4 +94,4 @@ jobs: tags: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }} suffixes: | -amd64 - -rpi \ No newline at end of file + -rpi