Skip to content

Commit

Permalink
ci: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ParzivalEugene committed Aug 26, 2024
1 parent d5d5b4c commit 318bf73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

RUN \
if [ -f yarn.lock ]; then yarn run build; \
elif [ -f package-lock.json ]; then npm run build; \
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \
else echo "Lockfile not found." && exit 1; \
fi
RUN --mount=type=secret,id=SPOTIFY_CLIENT_ID \
--mount=type=secret,id=SPOTIFY_CLIENT_SECRET \
--mount=type=secret,id=GH_TOKEN \
export SPOTIFY_CLIENT_ID=$(cat /run/secrets/SPOTIFY_CLIENT_ID) &&\
export SPOTIFY_CLIENT_SECRET=$(cat /run/secrets/SPOTIFY_CLIENT_ID) &&\
export GH_TOKEN=$(cat /run/secrets/SPOTIFY_CLIENT_ID)

RUN corepack enable pnpm && pnpm run build

FROM base AS runner
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "links",
"version": "0.4.3",
"version": "0.4.4",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down

0 comments on commit 318bf73

Please sign in to comment.