mirror of
https://github.com/CorentinTh/it-tools.git
synced 2026-11-16 21:22:22 +00:00
Phase 0 of the dependency upgrade plan in destan/toolbox#4. - Pin Node 26 in .nvmrc, the four workflows, and the Dockerfile. Node 22 entered maintenance on 2025-10-21. Node 26 is the active LTS. - Change packageManager from pnpm@9.11.0 to pnpm@9.15.9. - Replace `corepack enable` with pnpm/action-setup@v6.1.1, which reads the pnpm version from packageManager. The Node 26 distribution does not include corepack. The step runs before actions/setup-node, because `cache: 'pnpm'` needs pnpm on the path. - Pin pnpm 9.15.9 in the Dockerfile. The unpinned `npm install -g pnpm` installed the npm `latest` dist-tag (12.16.1). - Update the GitHub Actions to their latest tags: - actions/checkout: the v4-commented SHA to the v7.0.1 commit SHA - actions/setup-node: v3 to v7.1.0 - actions/cache: v3 to v6.1.0 - docker/login-action: v3 to v4.7.0 - docker/setup-qemu-action: v3 to v4.4.0 - docker/setup-buildx-action: v3 to v4.4.1 - docker/build-push-action: v5 to v7.4.0 - softprops/action-gh-release: v1 to v3.0.3 The workflows set every action input that they used before. Each input still exists in the action.yml of the target tag. Claude-Session: https://claude.ai/code/session_01PEUYi2Ve581PMqxiDbPpuS Co-authored-by: Claude <noreply@anthropic.com>
17 lines
496 B
Docker
17 lines
496 B
Docker
# build stage
|
|
FROM node:26-alpine AS build-stage
|
|
# Set environment variables for non-interactive npm installs
|
|
ENV NPM_CONFIG_LOGLEVEL warn
|
|
ENV CI true
|
|
WORKDIR /app
|
|
COPY package.json pnpm-lock.yaml ./
|
|
RUN npm install -g pnpm@9.15.9 && pnpm i --frozen-lockfile
|
|
COPY . .
|
|
RUN pnpm build
|
|
|
|
# production stage
|
|
FROM nginx:stable-alpine AS production-stage
|
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|