mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-18 19:16:42 +03:00
Merge 89b794705a into 2c480b9a89
This commit is contained in:
commit
d32e3a93b6
14
.github/actions/setup/action.yml
vendored
14
.github/actions/setup/action.yml
vendored
@ -5,7 +5,11 @@ inputs:
|
|||||||
required: true
|
required: true
|
||||||
outputs:
|
outputs:
|
||||||
image-name:
|
image-name:
|
||||||
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ steps.create-short-sha.outputs.SHORT_SHA }}
|
value: ${{ steps.meta.outputs.tags }}
|
||||||
|
image-labels:
|
||||||
|
value: ${{ steps.meta.outputs.labels }}
|
||||||
|
bake-file:
|
||||||
|
value: ${{ steps.meta.outputs.bake-file }}
|
||||||
cache-name:
|
cache-name:
|
||||||
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:cache
|
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:cache
|
||||||
runs:
|
runs:
|
||||||
@ -48,3 +52,11 @@ runs:
|
|||||||
- id: create-short-sha
|
- id: create-short-sha
|
||||||
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
|
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
|
||||||
shell: bash
|
shell: bash
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
bake-target: docker-metadata-action
|
||||||
|
# list of Docker images to use as base name for tags
|
||||||
|
images: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}
|
||||||
|
tags: type=raw,value=${{ steps.create-short-sha.outputs.SHORT_SHA }}
|
||||||
|
|||||||
33
.github/workflows/ci.yml
vendored
33
.github/workflows/ci.yml
vendored
@ -39,6 +39,7 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
target: frigate
|
target: frigate
|
||||||
|
labels: ${{ steps.setup.outputs.image-labels }}
|
||||||
tags: ${{ steps.setup.outputs.image-name }}-amd64
|
tags: ${{ steps.setup.outputs.image-name }}-amd64
|
||||||
cache-from: type=registry,ref=${{ steps.setup.outputs.cache-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
|
cache-to: type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64,mode=max
|
||||||
@ -63,8 +64,8 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
target: frigate
|
target: frigate
|
||||||
tags: |
|
labels: ${{ steps.setup.outputs.image-labels }}
|
||||||
${{ steps.setup.outputs.image-name }}-standard-arm64
|
tags: ${{ steps.setup.outputs.image-name }}-standard-arm64
|
||||||
cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-arm64
|
cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-arm64
|
||||||
- name: Build and push RPi build
|
- name: Build and push RPi build
|
||||||
uses: docker/bake-action@v6
|
uses: docker/bake-action@v6
|
||||||
@ -72,7 +73,9 @@ jobs:
|
|||||||
source: .
|
source: .
|
||||||
push: true
|
push: true
|
||||||
targets: rpi
|
targets: rpi
|
||||||
files: docker/rpi/rpi.hcl
|
files: |
|
||||||
|
docker/rpi/rpi.hcl
|
||||||
|
${{ steps.setup.outputs.bake-file }}
|
||||||
set: |
|
set: |
|
||||||
rpi.tags=${{ steps.setup.outputs.image-name }}-rpi
|
rpi.tags=${{ steps.setup.outputs.image-name }}-rpi
|
||||||
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-arm64
|
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-arm64
|
||||||
@ -101,7 +104,9 @@ jobs:
|
|||||||
source: .
|
source: .
|
||||||
push: true
|
push: true
|
||||||
targets: tensorrt
|
targets: tensorrt
|
||||||
files: docker/tensorrt/trt.hcl
|
files: |
|
||||||
|
docker/tensorrt/trt.hcl
|
||||||
|
${{ steps.setup.outputs.bake-file }}
|
||||||
set: |
|
set: |
|
||||||
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt-jp6
|
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt-jp6
|
||||||
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp6
|
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp6
|
||||||
@ -129,7 +134,9 @@ jobs:
|
|||||||
source: .
|
source: .
|
||||||
push: true
|
push: true
|
||||||
targets: tensorrt
|
targets: tensorrt
|
||||||
files: docker/tensorrt/trt.hcl
|
files: |
|
||||||
|
docker/tensorrt/trt.hcl
|
||||||
|
${{ steps.setup.outputs.bake-file }}
|
||||||
set: |
|
set: |
|
||||||
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt
|
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt
|
||||||
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-tensorrt
|
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-tensorrt
|
||||||
@ -143,7 +150,9 @@ jobs:
|
|||||||
source: .
|
source: .
|
||||||
push: true
|
push: true
|
||||||
targets: rocm
|
targets: rocm
|
||||||
files: docker/rocm/rocm.hcl
|
files: |
|
||||||
|
docker/rocm/rocm.hcl
|
||||||
|
${{ steps.setup.outputs.bake-file }}
|
||||||
set: |
|
set: |
|
||||||
rocm.tags=${{ steps.setup.outputs.image-name }}-rocm
|
rocm.tags=${{ steps.setup.outputs.image-name }}-rocm
|
||||||
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-rocm,mode=max
|
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-rocm,mode=max
|
||||||
@ -169,7 +178,9 @@ jobs:
|
|||||||
source: .
|
source: .
|
||||||
push: true
|
push: true
|
||||||
targets: rk
|
targets: rk
|
||||||
files: docker/rockchip/rk.hcl
|
files: |
|
||||||
|
docker/rockchip/rk.hcl
|
||||||
|
${{ steps.setup.outputs.bake-file }}
|
||||||
set: |
|
set: |
|
||||||
rk.tags=${{ steps.setup.outputs.image-name }}-rk
|
rk.tags=${{ steps.setup.outputs.image-name }}-rk
|
||||||
*.cache-from=type=gha
|
*.cache-from=type=gha
|
||||||
@ -219,9 +230,15 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Create short sha
|
- name: Create short sha
|
||||||
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||||
|
- uses: docker/metadata-action@v5
|
||||||
|
id: metadata
|
||||||
|
with:
|
||||||
|
images: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}
|
||||||
|
tags: type=raw,value=${{ env.SHORT_SHA }}
|
||||||
- uses: int128/docker-manifest-create-action@v2
|
- uses: int128/docker-manifest-create-action@v2
|
||||||
with:
|
with:
|
||||||
tags: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}
|
index-annotations: ${{ steps.metadata.outputs.labels }}
|
||||||
|
tags: ${{ steps.metadata.outputs.tags }}
|
||||||
sources: |
|
sources: |
|
||||||
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-amd64
|
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-amd64
|
||||||
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-rpi
|
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-rpi
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
target "docker-metadata-action" {}
|
||||||
|
|
||||||
target wheels {
|
target wheels {
|
||||||
dockerfile = "docker/main/Dockerfile"
|
dockerfile = "docker/main/Dockerfile"
|
||||||
platforms = ["linux/arm64"]
|
platforms = ["linux/arm64"]
|
||||||
@ -18,6 +20,7 @@ target rootfs {
|
|||||||
|
|
||||||
target rk {
|
target rk {
|
||||||
dockerfile = "docker/rockchip/Dockerfile"
|
dockerfile = "docker/rockchip/Dockerfile"
|
||||||
|
inherits = ["docker-metadata-action"]
|
||||||
contexts = {
|
contexts = {
|
||||||
wheels = "target:wheels",
|
wheels = "target:wheels",
|
||||||
deps = "target:deps",
|
deps = "target:deps",
|
||||||
|
|||||||
@ -11,6 +11,8 @@ variable "HSA_OVERRIDE" {
|
|||||||
default = "1"
|
default = "1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
target "docker-metadata-action" {}
|
||||||
|
|
||||||
target wget {
|
target wget {
|
||||||
dockerfile = "docker/main/Dockerfile"
|
dockerfile = "docker/main/Dockerfile"
|
||||||
platforms = ["linux/amd64"]
|
platforms = ["linux/amd64"]
|
||||||
@ -31,6 +33,7 @@ target rootfs {
|
|||||||
|
|
||||||
target rocm {
|
target rocm {
|
||||||
dockerfile = "docker/rocm/Dockerfile"
|
dockerfile = "docker/rocm/Dockerfile"
|
||||||
|
inherits = ["docker-metadata-action"]
|
||||||
contexts = {
|
contexts = {
|
||||||
deps = "target:deps",
|
deps = "target:deps",
|
||||||
wget = "target:wget",
|
wget = "target:wget",
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
target "docker-metadata-action" {}
|
||||||
|
|
||||||
target deps {
|
target deps {
|
||||||
dockerfile = "docker/main/Dockerfile"
|
dockerfile = "docker/main/Dockerfile"
|
||||||
platforms = ["linux/arm64"]
|
platforms = ["linux/arm64"]
|
||||||
@ -12,6 +14,7 @@ target rootfs {
|
|||||||
|
|
||||||
target rpi {
|
target rpi {
|
||||||
dockerfile = "docker/rpi/Dockerfile"
|
dockerfile = "docker/rpi/Dockerfile"
|
||||||
|
inherits = ["docker-metadata-action"]
|
||||||
contexts = {
|
contexts = {
|
||||||
deps = "target:deps",
|
deps = "target:deps",
|
||||||
rootfs = "target:rootfs"
|
rootfs = "target:rootfs"
|
||||||
|
|||||||
@ -29,6 +29,8 @@ fi
|
|||||||
EOT
|
EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
target "docker-metadata-action" {}
|
||||||
|
|
||||||
target "_build_args" {
|
target "_build_args" {
|
||||||
args = {
|
args = {
|
||||||
BASE_IMAGE = BASE_IMAGE,
|
BASE_IMAGE = BASE_IMAGE,
|
||||||
@ -81,6 +83,7 @@ target "trt-deps" {
|
|||||||
|
|
||||||
target "tensorrt" {
|
target "tensorrt" {
|
||||||
dockerfile = "docker/tensorrt/Dockerfile.${ARCH}"
|
dockerfile = "docker/tensorrt/Dockerfile.${ARCH}"
|
||||||
|
inherits = ["docker-metadata-action", "_build_args"]
|
||||||
context = "."
|
context = "."
|
||||||
contexts = {
|
contexts = {
|
||||||
wget = "target:wget",
|
wget = "target:wget",
|
||||||
@ -89,7 +92,6 @@ target "tensorrt" {
|
|||||||
rootfs = "target:rootfs"
|
rootfs = "target:rootfs"
|
||||||
}
|
}
|
||||||
target = "frigate-tensorrt"
|
target = "frigate-tensorrt"
|
||||||
inherits = ["_build_args"]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
target "devcontainer-trt" {
|
target "devcontainer-trt" {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user