mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-06 03:05:26 +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:
|
GITHUB_TOKEN:
|
||||||
required: true
|
required: true
|
||||||
outputs:
|
outputs:
|
||||||
lowercase-repo:
|
image-name:
|
||||||
value: ${{ steps.lowercaseRepo.outputs.lowercase }}
|
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}
|
||||||
|
cache-name:
|
||||||
|
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:cache
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@ -34,10 +34,9 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
target: frigate
|
target: frigate
|
||||||
tags: |
|
tags: ${{ steps.setup.outputs.image-name }}-amd64
|
||||||
ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-amd64
|
cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64
|
||||||
cache-from: type=gha
|
cache-to: type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64,mode=max,compression=zstd
|
||||||
cache-to: type=gha,mode=max,compression=zstd
|
|
||||||
- name: Build and push TensorRT (x86 GPU)
|
- name: Build and push TensorRT (x86 GPU)
|
||||||
uses: docker/bake-action@v3
|
uses: docker/bake-action@v3
|
||||||
with:
|
with:
|
||||||
@ -45,8 +44,7 @@ jobs:
|
|||||||
targets: tensorrt
|
targets: tensorrt
|
||||||
files: docker/tensorrt/trt.hcl
|
files: docker/tensorrt/trt.hcl
|
||||||
set: |
|
set: |
|
||||||
tensorrt.tags=ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-tensorrt
|
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt
|
||||||
*.cache-from=type=gha
|
|
||||||
arm64_build:
|
arm64_build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: ARM Build
|
name: ARM Build
|
||||||
@ -67,9 +65,9 @@ jobs:
|
|||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
target: frigate
|
target: frigate
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-standard-arm64
|
${{ steps.setup.outputs.image-name }}-standard-arm64
|
||||||
cache-from: type=gha
|
cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-standard-arm64
|
||||||
cache-to: type=gha,mode=max,compression=zstd
|
cache-to: type=registry,ref=${{ steps.setup.outputs.cache-name }}-standard-arm64,mode=max,compression=zstd
|
||||||
- name: Build and push RPi build
|
- name: Build and push RPi build
|
||||||
uses: docker/bake-action@v3
|
uses: docker/bake-action@v3
|
||||||
with:
|
with:
|
||||||
@ -77,8 +75,7 @@ jobs:
|
|||||||
targets: rpi
|
targets: rpi
|
||||||
files: docker/rpi/rpi.hcl
|
files: docker/rpi/rpi.hcl
|
||||||
set: |
|
set: |
|
||||||
rpi.tags=ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-rpi
|
rpi.tags=${{ steps.setup.outputs.image-name }}-rpi
|
||||||
*.cache-from=type=gha
|
|
||||||
jetson_jp4_build:
|
jetson_jp4_build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Jetson Jetpack 4
|
name: Jetson Jetpack 4
|
||||||
@ -102,9 +99,9 @@ jobs:
|
|||||||
targets: tensorrt
|
targets: tensorrt
|
||||||
files: docker/tensorrt/trt.hcl
|
files: docker/tensorrt/trt.hcl
|
||||||
set: |
|
set: |
|
||||||
tensorrt.tags=ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-tensorrt-jp4
|
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt-jp4
|
||||||
*.cache-from=type=gha
|
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-tensorrt-jp4
|
||||||
*.cache-to=type=gha,mode=max,compression=zstd
|
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-tensorrt-jp4,mode=max,compression=zstd
|
||||||
jetson_jp5_build:
|
jetson_jp5_build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Jetson Jetpack 5
|
name: Jetson Jetpack 5
|
||||||
@ -128,9 +125,9 @@ jobs:
|
|||||||
targets: tensorrt
|
targets: tensorrt
|
||||||
files: docker/tensorrt/trt.hcl
|
files: docker/tensorrt/trt.hcl
|
||||||
set: |
|
set: |
|
||||||
tensorrt.tags=ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-tensorrt-jp5
|
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt-jp5
|
||||||
*.cache-from=type=gha
|
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-tensorrt-jp5
|
||||||
*.cache-to=type=gha,mode=max,compression=zstd
|
*.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
|
# The majority of users running arm64 are rpi users, so the rpi
|
||||||
# build should be the primary arm64 image
|
# build should be the primary arm64 image
|
||||||
assemble_default_build:
|
assemble_default_build:
|
||||||
@ -154,7 +151,7 @@ jobs:
|
|||||||
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||||
- uses: int128/docker-manifest-create-action@v1
|
- uses: int128/docker-manifest-create-action@v1
|
||||||
with:
|
with:
|
||||||
tags: ghcr.io/${{ steps.setup.outputs.lowercase-repo }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}
|
tags: ${{ steps.setup.outputs.image-name }}
|
||||||
suffixes: |
|
suffixes: |
|
||||||
-amd64
|
-amd64
|
||||||
-rpi
|
-rpi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user