mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
Build a nightly image
This commit is contained in:
parent
f37f034b6a
commit
92fc412a3e
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
@ -5,6 +5,9 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
- master
|
- master
|
||||||
|
schedule:
|
||||||
|
# Build a nighly image every day at 2am UTC
|
||||||
|
- cron: '0 2 * * *'
|
||||||
|
|
||||||
# only run the latest commit to avoid cache overwrites
|
# only run the latest commit to avoid cache overwrites
|
||||||
concurrency:
|
concurrency:
|
||||||
@ -44,6 +47,14 @@ jobs:
|
|||||||
run: make version
|
run: make version
|
||||||
- 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
|
||||||
|
- name: Docker Meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}
|
||||||
|
tags: |
|
||||||
|
type=raw,value=${{ github.ref_name }}-${{ env.SHORT_SHA }},enable=${{ github.event_name != 'schedule') }}
|
||||||
|
type=raw,value=nightly,enable=${{ github.event_name == 'schedule') }}
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
@ -51,10 +62,17 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
target: frigate
|
target: frigate
|
||||||
tags: |
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}
|
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
- name: Docker Meta TensorRT
|
||||||
|
id: meta-tensorrt
|
||||||
|
uses: docker/metadata-action@v4
|
||||||
|
with:
|
||||||
|
images: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}
|
||||||
|
tags: |
|
||||||
|
type=raw,value=${{ github.ref_name }}-${{ env.SHORT_SHA }}-tensorrt,enable=${{ github.event_name != 'schedule') }}
|
||||||
|
type=raw,value=nightly-tensorrt,enable=${{ github.event_name == 'schedule') }}
|
||||||
- name: Build and push TensorRT
|
- name: Build and push TensorRT
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
@ -62,6 +80,5 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
target: frigate-tensorrt
|
target: frigate-tensorrt
|
||||||
tags: |
|
tags: ${{ steps.meta-tensorrt.outputs.tags }}
|
||||||
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-tensorrt
|
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user