diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4b8564..d42934c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,7 @@ on: branches: [master, main] push: branches: [master, main] + workflow_dispatch: jobs: build-scan: @@ -33,11 +34,11 @@ jobs: uses: actions/checkout@v6 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Log in to GHCR (push only) - if: github.event_name == 'push' - uses: docker/login-action@v3 + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} @@ -52,7 +53,7 @@ jobs: with: context: . file: ${{ matrix.dockerfile }} - push: ${{ github.event_name == 'push' }} + push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} load: ${{ github.event_name == 'pull_request' }} cache-from: type=gha cache-to: type=gha,mode=max diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index d942a41..087ffc9 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -1,5 +1,10 @@ FROM node:24-alpine AS base WORKDIR /app +RUN npm install -g npm@latest && \ + mkdir -p /tmp/patch && cd /tmp/patch && npm init -y && \ + npm install brace-expansion@^5.0.6 && \ + cp -r node_modules/brace-expansion /usr/local/lib/node_modules/npm/node_modules/ && \ + rm -rf /tmp/patch COPY package.json /tmp/package.json RUN corepack enable && \ PNPM_VERSION=$(node -e "process.stdout.write(require('/tmp/package.json').packageManager.split('@')[1])") && \ @@ -36,6 +41,11 @@ RUN pnpm --filter fintrack-api deploy --prod /deploy # ── runner ──────────────────────────────────────────────────────────────────── FROM node:24-alpine AS runner WORKDIR /app +RUN npm install -g npm@latest && \ + mkdir -p /tmp/patch && cd /tmp/patch && npm init -y && \ + npm install brace-expansion@^5.0.6 && \ + cp -r node_modules/brace-expansion /usr/local/lib/node_modules/npm/node_modules/ && \ + rm -rf /tmp/patch ENV NODE_ENV=production diff --git a/apps/bot/Dockerfile b/apps/bot/Dockerfile index f5597fd..6eae2c2 100644 --- a/apps/bot/Dockerfile +++ b/apps/bot/Dockerfile @@ -1,5 +1,10 @@ FROM node:24-alpine AS base WORKDIR /app +RUN npm install -g npm@latest && \ + mkdir -p /tmp/patch && cd /tmp/patch && npm init -y && \ + npm install brace-expansion@^5.0.6 && \ + cp -r node_modules/brace-expansion /usr/local/lib/node_modules/npm/node_modules/ && \ + rm -rf /tmp/patch COPY package.json /tmp/package.json RUN corepack enable && \ PNPM_VERSION=$(node -e "process.stdout.write(require('/tmp/package.json').packageManager.split('@')[1])") && \ @@ -33,6 +38,11 @@ RUN pnpm --filter fintrack-bot deploy --prod /deploy # ── runner ──────────────────────────────────────────────────────────────────── FROM node:24-alpine AS runner WORKDIR /app +RUN npm install -g npm@latest && \ + mkdir -p /tmp/patch && cd /tmp/patch && npm init -y && \ + npm install brace-expansion@^5.0.6 && \ + cp -r node_modules/brace-expansion /usr/local/lib/node_modules/npm/node_modules/ && \ + rm -rf /tmp/patch ENV NODE_ENV=production diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index f1a774a..fce7763 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -1,5 +1,10 @@ FROM node:24-alpine AS base WORKDIR /app +RUN npm install -g npm@latest && \ + mkdir -p /tmp/patch && cd /tmp/patch && npm init -y && \ + npm install brace-expansion@^5.0.6 && \ + cp -r node_modules/brace-expansion /usr/local/lib/node_modules/npm/node_modules/ && \ + rm -rf /tmp/patch COPY package.json /tmp/package.json RUN corepack enable && \ PNPM_VERSION=$(node -e "process.stdout.write(require('/tmp/package.json').packageManager.split('@')[1])") && \ @@ -33,6 +38,11 @@ RUN pnpm --filter fintrack-web build # ── runner ──────────────────────────────────────────────────────────────────── FROM node:24-alpine AS runner WORKDIR /app +RUN npm install -g npm@latest && \ + mkdir -p /tmp/patch && cd /tmp/patch && npm init -y && \ + npm install brace-expansion@^5.0.6 && \ + cp -r node_modules/brace-expansion /usr/local/lib/node_modules/npm/node_modules/ && \ + rm -rf /tmp/patch ENV NODE_ENV=production ENV NEXT_TELEMETRY_DISABLED=1 ENV HOSTNAME=0.0.0.0