mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 09:45:22 +03:00
Allow to set IMAGE_OWNER
This commit is contained in:
parent
f4b2c3f371
commit
37916c053b
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -28,3 +28,5 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Build image
|
- name: Build image
|
||||||
run: make push
|
run: make push
|
||||||
|
env:
|
||||||
|
IMAGE_OWNER: ${{ github.actor }}
|
||||||
|
|||||||
13
Makefile
13
Makefile
@ -2,11 +2,12 @@ default_target: local
|
|||||||
|
|
||||||
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
|
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
|
||||||
VERSION = 0.12.0
|
VERSION = 0.12.0
|
||||||
|
IMAGE_OWNER ?= blakeblackshear
|
||||||
CURRENT_UID := $(shell id -u)
|
CURRENT_UID := $(shell id -u)
|
||||||
CURRENT_GID := $(shell id -g)
|
CURRENT_GID := $(shell id -g)
|
||||||
|
|
||||||
version:
|
version:
|
||||||
echo "VERSION=\"$(VERSION)-$(COMMIT_HASH)\"" > frigate/version.py
|
echo 'VERSION = "$(VERSION)-$(COMMIT_HASH)"' > frigate/version.py
|
||||||
|
|
||||||
local: version
|
local: version
|
||||||
docker buildx build --tag frigate:latest --load .
|
docker buildx build --tag frigate:latest --load .
|
||||||
@ -15,19 +16,19 @@ build_web:
|
|||||||
docker buildx build --target web-dist --output web/dist .
|
docker buildx build --target web-dist --output web/dist .
|
||||||
|
|
||||||
amd64:
|
amd64:
|
||||||
docker buildx build --platform linux/amd64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) .
|
docker buildx build --platform linux/amd64 --tag $(IMAGE_OWNER)/frigate:$(VERSION)-$(COMMIT_HASH) .
|
||||||
|
|
||||||
arm64:
|
arm64:
|
||||||
docker buildx build --platform linux/arm64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) .
|
docker buildx build --platform linux/arm64 --tag $(IMAGE_OWNER)/frigate:$(VERSION)-$(COMMIT_HASH) .
|
||||||
|
|
||||||
armv7:
|
armv7:
|
||||||
docker buildx build --platform linux/arm/v7 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) .
|
docker buildx build --platform linux/arm/v7 --tag $(IMAGE_OWNER)/frigate:$(VERSION)-$(COMMIT_HASH) .
|
||||||
|
|
||||||
build: version amd64 arm64 armv7
|
build: version amd64 arm64 armv7
|
||||||
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag blakeblackshear/frigate:$(VERSION)-$(COMMIT_HASH) .
|
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag $(IMAGE_OWNER)/frigate:$(VERSION)-$(COMMIT_HASH) .
|
||||||
|
|
||||||
push: build
|
push: build
|
||||||
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag ghcr.io/blakeblackshear/frigate:${GITHUB_REF_NAME}-$(COMMIT_HASH) .
|
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag ghcr.io/$(IMAGE_OWNER)/frigate:${GITHUB_REF_NAME}-$(COMMIT_HASH) .
|
||||||
|
|
||||||
run_tests: frigate
|
run_tests: frigate
|
||||||
docker run --rm --entrypoint=python3 frigate:latest -u -m unittest
|
docker run --rm --entrypoint=python3 frigate:latest -u -m unittest
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user