Faster image builds with caching (#4491)

* fix makefile variable

* add branch for testing

* fix arm32 build

* use amd64 for web build

* install wheels in a separate layer for better parallel builds

* try build-push-action

* try using gh context

* use short sha

* cleanup
This commit is contained in:
Blake Blackshear
2022-11-23 20:00:45 -06:00
committed by GitHub
parent f4187d6b83
commit 370276a7b6
4 changed files with 23 additions and 21 deletions

View File

@@ -26,7 +26,15 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: make push
env:
IMAGE_REPO: ghcr.io/${{ github.actor }}/frigate
- name: Create short sha
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
ghcr.io/blakeblackshear/frigate:${{ github.ref_name }}-${{ env.SHORT_SHA }}
cache-from: type=gha
cache-to: type=gha,mode=max