mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-21 12:36:42 +03:00
Merge 52e6fbebd2 into de066d0062
This commit is contained in:
commit
80182da27c
2
.github/actions/setup/action.yml
vendored
2
.github/actions/setup/action.yml
vendored
@ -4,6 +4,8 @@ inputs:
|
|||||||
GITHUB_TOKEN:
|
GITHUB_TOKEN:
|
||||||
required: true
|
required: true
|
||||||
outputs:
|
outputs:
|
||||||
|
short-sha:
|
||||||
|
value: ${{ steps.create-short-sha.outputs.SHORT_SHA }}
|
||||||
image-name:
|
image-name:
|
||||||
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ steps.create-short-sha.outputs.SHORT_SHA }}
|
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ steps.create-short-sha.outputs.SHORT_SHA }}
|
||||||
cache-name:
|
cache-name:
|
||||||
|
|||||||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -37,6 +37,8 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: docker/main/Dockerfile
|
file: docker/main/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
|
build-args:
|
||||||
|
GIT_COMMIT_HASH=${{ steps.setup.outputs.short-sha }}
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
target: frigate
|
target: frigate
|
||||||
tags: ${{ steps.setup.outputs.image-name }}-amd64
|
tags: ${{ steps.setup.outputs.image-name }}-amd64
|
||||||
@ -61,6 +63,8 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: docker/main/Dockerfile
|
file: docker/main/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
|
build-args:
|
||||||
|
GIT_COMMIT_HASH=${{ steps.setup.outputs.short-sha }}
|
||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
target: frigate
|
target: frigate
|
||||||
tags: |
|
tags: |
|
||||||
|
|||||||
@ -318,6 +318,10 @@ FROM --platform=$BUILDPLATFORM node:20 AS web-build
|
|||||||
|
|
||||||
WORKDIR /work
|
WORKDIR /work
|
||||||
COPY web/package.json web/package-lock.json ./
|
COPY web/package.json web/package-lock.json ./
|
||||||
|
|
||||||
|
ARG GIT_COMMIT_HASH
|
||||||
|
ENV GIT_COMMIT_HASH=$GIT_COMMIT_HASH
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
COPY web/ ./
|
COPY web/ ./
|
||||||
|
|||||||
@ -33,7 +33,7 @@ i18n
|
|||||||
fallbackLng: "en", // use en if detected lng is not available
|
fallbackLng: "en", // use en if detected lng is not available
|
||||||
|
|
||||||
backend: {
|
backend: {
|
||||||
loadPath: "locales/{{lng}}/{{ns}}.json",
|
loadPath: `locales/{{lng}}/{{ns}}.json?v=${import.meta.env.GIT_COMMIT_HASH || "unknown"}`,
|
||||||
},
|
},
|
||||||
|
|
||||||
ns: [
|
ns: [
|
||||||
|
|||||||
@ -5,11 +5,12 @@ import react from "@vitejs/plugin-react-swc";
|
|||||||
import monacoEditorPlugin from "vite-plugin-monaco-editor";
|
import monacoEditorPlugin from "vite-plugin-monaco-editor";
|
||||||
|
|
||||||
const proxyHost = process.env.PROXY_HOST || "localhost:5000";
|
const proxyHost = process.env.PROXY_HOST || "localhost:5000";
|
||||||
|
const gitCommitHash = process.env.GIT_COMMIT_HASH || "unknown";
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
define: {
|
define: {
|
||||||
"import.meta.vitest": "undefined",
|
"import.meta.vitest": "undefined",
|
||||||
|
"import.meta.env.GIT_COMMIT_HASH": JSON.stringify(gitCommitHash),
|
||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user