From ac34c05ea0ef10763ad3fc80638229f41ab68063 Mon Sep 17 00:00:00 2001 From: manager Date: Fri, 8 May 2026 08:43:15 +0000 Subject: [PATCH] fix(ci): write .env.staging so Docker build resolves COPY step Dockerfile builds with APP_ENV=staging and COPYs .env.staging into the runner stage; CI was only writing .env, so the build failed at "/app/.env.staging": not found. Mirror the secret into both files for each branch step. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/main.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d5e9d8c..0fae5b7 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -26,11 +26,13 @@ jobs: if: github.ref == 'refs/heads/main' run: | echo ${{ secrets.ENV_PRODUCTION }} | base64 -d > .env + cp .env .env.staging - name: Copy staging env file if: github.ref == 'refs/heads/dev' run: | - echo ${{ secrets.ENV_STAGING }} | base64 -d > .env + echo ${{ secrets.ENV_STAGING }} | base64 -d > .env.staging + cp .env.staging .env - name: Production Deploy