Skip to content

Commit

Permalink
fix: pass decap env vars to fe_build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Leksat committed Dec 12, 2024
1 parent 9db7c62 commit cbc46d5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .lagoon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ RUN --mount=type=cache,target=/tmp/cache composer install --no-dev

WORKDIR /app

# Decap config.
ENV VITE_DECAP_REPO='AmazeeLabs/silverback-template'
ARG LAGOON_GIT_BRANCH
ENV VITE_DECAP_BRANCH="$LAGOON_GIT_BRANCH"

# Copy the all package sources, install and prepare them.
COPY . /app
RUN --mount=type=cache,target=/tmp/cache pnpm i && \
Expand Down Expand Up @@ -118,4 +113,9 @@ RUN npm install -g [email protected]

COPY --from=builder /tmp/.deploy/publisher /app

# Decap config.
ENV VITE_DECAP_REPO='AmazeeLabs/silverback-template'
ARG LAGOON_GIT_BRANCH
ENV VITE_DECAP_BRANCH="$LAGOON_GIT_BRANCH"

CMD pnpm publisher
1 change: 1 addition & 0 deletions apps/decap/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"extends": ["//"],
"tasks": {
"prep:vite": {
"env": ["VITE_DECAP_REPO", "VITE_DECAP_BRANCH"],
"dependsOn": ["^prep"],
"inputs": ["src/**", "vite.config.ts", "index.html"],
"outputs": ["dist/**"]
Expand Down
2 changes: 2 additions & 0 deletions apps/publisher/publisher.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ function githubEnvVars(): Record<string, string> {
'PUBLISHER_OAUTH2_SESSION_SECRET',
'PUBLISHER_OAUTH2_ENVIRONMENT_TYPE',
'PUBLISHER_OAUTH2_TOKEN_HOST',
'VITE_DECAP_REPO',
'VITE_DECAP_BRANCH',
].map((name) => {
if (name === 'DRUPAL_INTERNAL_URL') {
// No internal URLs when building on Github.
Expand Down

0 comments on commit cbc46d5

Please sign in to comment.