From 9db27aaa28fd4a6f04359e5f820cf8471cc807dc Mon Sep 17 00:00:00 2001 From: Christopher Bisset Date: Mon, 8 Aug 2022 08:58:45 +1000 Subject: [PATCH] moved variable out of github actions --- .github/workflows/publish-release.yaml | 4 ---- docker/production/scripts/1-image-build.sh | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml index 466fd3b..f193998 100644 --- a/.github/workflows/publish-release.yaml +++ b/.github/workflows/publish-release.yaml @@ -36,10 +36,6 @@ jobs: $(docker manifest inspect ghcr.io/${{ github.repository }}:$VERSION > /dev/null) || NOT_PREVIOUSLY_PUBLISHED=1 echo "::set-output name=NOT_PREVIOUSLY_PUBLISHED::$NOT_PREVIOUSLY_PUBLISHED" - - name: Update Version in Code - run: | - sed -i 's/insert-version/${{ steps.gathervars.outputs.VERSION }}/g' ./src/routes/settings.html.svelte - - name: Log in to the Container registry uses: docker/login-action@v1 if: ${{ steps.gathervars.outputs.NOT_PREVIOUSLY_PUBLISHED != 0 }} diff --git a/docker/production/scripts/1-image-build.sh b/docker/production/scripts/1-image-build.sh index bb4921f..271e136 100644 --- a/docker/production/scripts/1-image-build.sh +++ b/docker/production/scripts/1-image-build.sh @@ -8,5 +8,8 @@ git clone ${PROJECT_URL} ${PROJECT_NAME} cd ${PROJECT_NAME} npm install +# inject the version number +sed -i 's/insert-version/${{ steps.gathervars.outputs.VERSION }}/g' ./src/routes/settings.html.svelte + # build the project npm run build \ No newline at end of file