use bun as package manager and runner for the docke rcontainer, plus some tweak on the github action

This commit is contained in:
Platane
2025-02-20 19:34:18 +07:00
committed by GitHub
parent 74bc4f0651
commit 85da3901f5
29 changed files with 25796 additions and 10209 deletions

View File

@@ -1,32 +1,27 @@
FROM node:20-slim as builder
FROM oven/bun:1.2.2-slim as builder
WORKDIR /app
COPY package.json yarn.lock ./
COPY package.json bun.lock ./
COPY tsconfig.json ./
COPY packages packages
RUN export YARN_CACHE_FOLDER="$(mktemp -d)" \
&& yarn install --frozen-lockfile \
&& rm -r "$YARN_CACHE_FOLDER"
RUN bun install --no-cache
RUN yarn build:action
RUN bun run build:action
FROM node:20-slim
FROM oven/bun:1.2.2-slim
WORKDIR /action-release
RUN export YARN_CACHE_FOLDER="$(mktemp -d)" \
&& yarn add canvas@3.1.0 gifsicle@5.3.0 --no-lockfile \
&& rm -r "$YARN_CACHE_FOLDER"
RUN bun add canvas@3.1.0 gifsicle@5.3.0 --no-lockfile --no-cache
COPY --from=builder /app/packages/action/dist/ /action-release/
CMD ["node", "/action-release/index.js"]
CMD ["bun", "/action-release/index.js"]