From c90b3e75aaab837045227f9d807cd5ebc3dad4e7 Mon Sep 17 00:00:00 2001 From: David Jakowenko Date: Thu, 29 Apr 2021 02:16:12 -0400 Subject: [PATCH 1/2] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9caa6dc..84cfd7ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: echo "TAG=beta" >> $GITHUB_ENV echo "ARCH=linux/amd64" >> $GITHUB_ENV - name: Set ENV to latest - if: endsWith(github.ref, '/master') + if: ${{ github.event_name == 'release' && github.event.action == 'released' }} run: | echo "TAG=latest" >> $GITHUB_ENV echo "ARCH=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64" >> $GITHUB_ENV From 24782ed001bfed35790e14b577cb90f6876a4fda Mon Sep 17 00:00:00 2001 From: David Jakowenko Date: Thu, 29 Apr 2021 02:34:08 -0400 Subject: [PATCH 2/2] fix: allow SNAPSHOT_RETRIES and LATEST_RETRIES to be set to 0 --- api/src/constants/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/constants/index.js b/api/src/constants/index.js index 7582a4b8..c1ffdb81 100644 --- a/api/src/constants/index.js +++ b/api/src/constants/index.js @@ -60,8 +60,8 @@ let constants = { FRIGATE_CAMERAS: FRIGATE_CAMERAS ? FRIGATE_CAMERAS.replace(/ /g, '').split(',') : null, FRIGATE_ZONES: FRIGATE_ZONES ? FRIGATE_ZONES.replace(/ /g, '').split(',') : null, FRIGATE_IMAGE_HEIGHT: FRIGATE_URL ? parseInt(FRIGATE_IMAGE_HEIGHT, 10) || 800 : null, - SNAPSHOT_RETRIES: FRIGATE_URL ? parseInt(SNAPSHOT_RETRIES, 10) || 10 : null, - LATEST_RETRIES: FRIGATE_URL ? parseInt(LATEST_RETRIES, 10) || 10 : null, + SNAPSHOT_RETRIES: FRIGATE_URL ? (SNAPSHOT_RETRIES ? parseInt(SNAPSHOT_RETRIES, 10) : 10) : null, + LATEST_RETRIES: FRIGATE_URL ? (LATEST_RETRIES ? parseInt(LATEST_RETRIES, 10) : 10) : null, }; for (const [key, value] of Object.entries(constants)) {