mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
Switch from gha cache to registry cache
A CI run (four images cached with mode-max) populates the cache with 295 cache entries totalling 23.44 GB. This exceeds gha's 10GB limit, causing trashing. Try with a registry instead.
This commit is contained in:
parent
ca4117216a
commit
ce4048b5f6
6
.github/actions/setup/action.yml
vendored
6
.github/actions/setup/action.yml
vendored
@ -4,8 +4,10 @@ inputs:
|
||||
GITHUB_TOKEN:
|
||||
required: true
|
||||
outputs:
|
||||
lowercase-repo:
|
||||
value: ${{ steps.lowercaseRepo.outputs.lowercase }}
|
||||
image-name:
|
||||
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}
|
||||
cache-name:
|
||||
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:cache
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
||||
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@ -34,10 +34,9 @@ jobs:
|
||||
push: true
|
||||
platforms: linux/amd64
|
||||
target: frigate
|
||||
tags: |
|
||||
ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-amd64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max,compression=zstd
|
||||
tags: ${{ steps.setup.outputs.image-name }}-amd64
|
||||
cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64
|
||||
cache-to: type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64,mode=max,compression=zstd
|
||||
- name: Build and push TensorRT (x86 GPU)
|
||||
uses: docker/bake-action@v3
|
||||
with:
|
||||
@ -45,8 +44,7 @@ jobs:
|
||||
targets: tensorrt
|
||||
files: docker/tensorrt/trt.hcl
|
||||
set: |
|
||||
tensorrt.tags=ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-tensorrt
|
||||
*.cache-from=type=gha
|
||||
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt
|
||||
arm64_build:
|
||||
runs-on: ubuntu-latest
|
||||
name: ARM Build
|
||||
@ -67,9 +65,9 @@ jobs:
|
||||
platforms: linux/arm64
|
||||
target: frigate
|
||||
tags: |
|
||||
ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-standard-arm64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max,compression=zstd
|
||||
${{ steps.setup.outputs.image-name }}-standard-arm64
|
||||
cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-standard-arm64
|
||||
cache-to: type=registry,ref=${{ steps.setup.outputs.cache-name }}-standard-arm64,mode=max,compression=zstd
|
||||
- name: Build and push RPi build
|
||||
uses: docker/bake-action@v3
|
||||
with:
|
||||
@ -77,8 +75,7 @@ jobs:
|
||||
targets: rpi
|
||||
files: docker/rpi/rpi.hcl
|
||||
set: |
|
||||
rpi.tags=ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-rpi
|
||||
*.cache-from=type=gha
|
||||
rpi.tags=${{ steps.setup.outputs.image-name }}-rpi
|
||||
jetson_jp4_build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Jetson Jetpack 4
|
||||
@ -102,9 +99,9 @@ jobs:
|
||||
targets: tensorrt
|
||||
files: docker/tensorrt/trt.hcl
|
||||
set: |
|
||||
tensorrt.tags=ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-tensorrt-jp4
|
||||
*.cache-from=type=gha
|
||||
*.cache-to=type=gha,mode=max,compression=zstd
|
||||
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt-jp4
|
||||
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-tensorrt-jp4
|
||||
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-tensorrt-jp4,mode=max,compression=zstd
|
||||
jetson_jp5_build:
|
||||
runs-on: ubuntu-latest
|
||||
name: Jetson Jetpack 5
|
||||
@ -128,9 +125,9 @@ jobs:
|
||||
targets: tensorrt
|
||||
files: docker/tensorrt/trt.hcl
|
||||
set: |
|
||||
tensorrt.tags=ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-tensorrt-jp5
|
||||
*.cache-from=type=gha
|
||||
*.cache-to=type=gha,mode=max,compression=zstd
|
||||
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt-jp5
|
||||
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-tensorrt-jp5
|
||||
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-tensorrt-jp5,mode=max,compression=zstd
|
||||
# The majority of users running arm64 are rpi users, so the rpi
|
||||
# build should be the primary arm64 image
|
||||
assemble_default_build:
|
||||
@ -154,7 +151,7 @@ jobs:
|
||||
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||
- uses: int128/docker-manifest-create-action@v1
|
||||
with:
|
||||
tags: ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}
|
||||
tags: ${{ steps.setup.outputs.image-name }}
|
||||
suffixes: |
|
||||
-amd64
|
||||
-rpi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user