diff --git a/.github/workflows/push-apply.yml b/.github/workflows/push-apply.yml index 9726e27..9667a72 100644 --- a/.github/workflows/push-apply.yml +++ b/.github/workflows/push-apply.yml @@ -1,9 +1,10 @@ name: push-apply -on: +on: push: branches: - main + workflow_dispatch: jobs: fmt: diff --git a/docker/Dockerfile.dbsync b/docker/Dockerfile.dbsync index 50bb531..2ebb850 100644 --- a/docker/Dockerfile.dbsync +++ b/docker/Dockerfile.dbsync @@ -13,7 +13,7 @@ COPY prisma ./prisma RUN \ if [ -f pnpm-lock.yaml ]; \ then \ - pnpm add prisma && pnpm i; \ + pnpm add prisma@4.16.2 && pnpm i; \ else \ echo "Lockfile not found." && exit 1; \ fi diff --git a/docker/Dockerfile.prod b/docker/Dockerfile.prod index 6441dc6..117811a 100644 --- a/docker/Dockerfile.prod +++ b/docker/Dockerfile.prod @@ -8,14 +8,14 @@ WORKDIR /app COPY ./prisma ./ -# Install dependencies based on the preferred package manager +# Install dependencies if lockfile exists COPY package.json pnpm-lock.yaml ./ RUN \ if [ -f pnpm-lock.yaml ]; \ then \ - yarn global add pnpm && pnpm add prisma && pnpm i; \ + yarn global add pnpm && pnpm add prisma@4.16.2 && pnpm i; \ else \ echo "Lockfile not found." && exit 1; \ fi @@ -30,7 +30,7 @@ WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -RUN pnpx prisma generate +RUN pnpm dlx prisma@4.16.2 generate ENV NEXT_TELEMETRY_DISABLED 1 # Pass the name of the Telegram bot from GitHub variables to the build process if it exists.