From 2913fa0d732efea787d2203125df5f12dfa9d0c4 Mon Sep 17 00:00:00 2001 From: TakahashiNguyen Date: Tue, 31 Mar 2026 07:52:42 +0000 Subject: [PATCH] fix: better ci and docker build (#20) Co-authored-by: TakahashiNg <83152264+TakahashiNguyen@users.noreply.github.com> Reviewed-on: https://git.demonkernel.io.vn/FoodSurf/frontend/pulls/20 --- .gitea/workflows/release.yaml | 36 +++++++++++++++++------------------ dockerfile | 3 +-- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index b20fc73..7014c22 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -84,24 +84,6 @@ jobs: VERSION=$(node -p "require('./package.json').version") echo "version=$VERSION" >> $GITHUB_OUTPUT - - name: Commit & Push Changes - if: gitea.ref == 'refs/heads/main' - run: | - if [ -n "$(git status --porcelain)" ]; then - git config --global user.name "gitea-actions" - git config --global user.email "actions-user@noreply.git.demonkernel.io.vn" - - REPO_NAME="${{ gitea.repository }}" - - git remote set-url origin ssh://git@$TARGET_IP:222/${REPO_NAME}.git - - git rm -r --cached . - git add . - git commit -m "chore: release [ci skip]" - - git push - fi - - name: Log in to Gitea Container Registry if: gitea.ref == 'refs/heads/main' uses: docker/login-action@v3 @@ -133,3 +115,21 @@ jobs: git.demonkernel.io.vn/${{ steps.meta.outputs.repo }}:latest git.demonkernel.io.vn/${{ steps.meta.outputs.repo }}:${{ steps.meta.outputs.version }} + - name: Commit & Push Changes + if: gitea.ref == 'refs/heads/main' + run: | + if [ -n "$(git status --porcelain)" ]; then + git config --global user.name "gitea-actions" + git config --global user.email "actions-user@noreply.git.demonkernel.io.vn" + + REPO_NAME="${{ gitea.repository }}" + + git remote set-url origin ssh://git@$TARGET_IP:222/${REPO_NAME}.git + + git rm -r --cached . + git add . + git commit -m "chore: release [ci skip]" + + git push + fi + diff --git a/dockerfile b/dockerfile index abb550e..d363d5c 100644 --- a/dockerfile +++ b/dockerfile @@ -19,8 +19,7 @@ COPY . . # Tắt dữ liệu thu thập của Next.js trong quá trình build ENV NEXT_TELEMETRY_DISABLED 1 -RUN npm install -g pnpm -RUN pnpm run build +RUN npm run build # --- Giai đoạn 3: Runner (Sản phẩm cuối) --- FROM node:25-alpine AS runner