From bd5a54031e398f30beda1ef5229daac628773366 Mon Sep 17 00:00:00 2001 From: Jackson Roberts Date: Thu, 26 Feb 2026 13:45:32 -0600 Subject: [PATCH] fix: add PUBLIC_API_URL env var to all build steps --- .github/workflows/build-and-publish.yaml | 10 ++++++++++ Dockerfile | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index 188be8f..19d7c46 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -22,10 +22,16 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout source code + uses: actions/checkout@v4 + - name: Build and push the Docker image uses: docker/build-push-action@v6 with: + context: . push: true + build-args: | + PUBLIC_API_URL=https://opt-api.osdci.net tags: | ghcr.io/project-optima/ttscm-ui:latest ghcr.io/project-optima/ttscm-ui:${{ github.event.release.tag_name }} @@ -47,6 +53,8 @@ jobs: - name: Build macOS distributables run: bun run make:macos + env: + PUBLIC_API_URL: https://opt-api.osdci.net - name: Upload macOS artifacts to release uses: softprops/action-gh-release@v2 @@ -72,6 +80,8 @@ jobs: - name: Build Windows distributables run: bun run make -- --platform win32 + env: + PUBLIC_API_URL: https://opt-api.osdci.net - name: Upload Windows artifacts to release uses: softprops/action-gh-release@v2 diff --git a/Dockerfile b/Dockerfile index 493273a..738f882 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,10 @@ RUN bun install --frozen-lockfile # Build the SvelteKit app with adapter-node COPY . . + +ARG PUBLIC_API_URL=https://opt-api.osdci.net +ENV PUBLIC_API_URL=$PUBLIC_API_URL + RUN bun run build:server # Production image