From 2b489e83bafdd5cf1f7655537f677e6ea0fab853 Mon Sep 17 00:00:00 2001 From: Arif Hasanic Date: Sun, 31 Aug 2025 16:58:19 +0200 Subject: [PATCH] write git sha env variable into docker container --- .github/workflows/ci.yml | 4 ++-- nginx.conf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31fd769..9c69dd1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,8 @@ jobs: run: bun install - name: Build run: bun run build - - name: Write git hash into dist - run: echo "export const GIT_HASH = '$(git rev-parse HEAD)';" > dist/git-hash.js + - name: Write GITHUB_SHA into dist + run: echo "export const GITHUB_SHA = '$GITHUB_SHA';" > dist/git-hash.js - name: Create Build Artifact uses: christopherhx/gitea-upload-artifact@v4 with: diff --git a/nginx.conf b/nginx.conf index a7fecc1..7e9c8a0 100644 --- a/nginx.conf +++ b/nginx.conf @@ -16,7 +16,7 @@ http { index index.html; location / { - try_files $uri $uri/ /index.html; + try_files $uri $uri/ /index.html /git-hash.js; } location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {