From feb6c73bf9cd6dcf5f28be1ac0d60e29d8efeb84 Mon Sep 17 00:00:00 2001 From: phuongdm Date: Sun, 10 May 2026 23:06:32 +0700 Subject: [PATCH] fix CD workflow --- .gitea/workflows/deploy-staging.yml | 56 +++++++++++++++++------------ 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/deploy-staging.yml b/.gitea/workflows/deploy-staging.yml index 85dc472..2e2f5c1 100644 --- a/.gitea/workflows/deploy-staging.yml +++ b/.gitea/workflows/deploy-staging.yml @@ -11,28 +11,40 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Login Registry - run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ secrets.REGISTRY_URL }} -u ${{ secrets.REGISTRY_USER }} --password-stdin - - - name: Build & Push + - name: Build & Save Image env: - IMAGE: ${{ secrets.REGISTRY_URL }}/${{ secrets.IMAGE_NAME }} + IMAGE: ${{ secrets.IMAGE_NAME }} run: | - docker build --build-arg NODE_VERSION=22.14.0 -t $IMAGE:staging-${{ github.sha }} -t $IMAGE:staging-latest . - docker push $IMAGE:staging-${{ github.sha }} - docker push $IMAGE:staging-latest + docker build --build-arg NODE_VERSION=22.14.0 -t $IMAGE:staging-${{ github.sha }} . + docker save -o /tmp/ttmt-frontend.tar $IMAGE:staging-${{ github.sha }} - - name: Deploy local (docker compose) - env: - IMAGE: ${{ secrets.REGISTRY_URL }}/${{ secrets.IMAGE_NAME }} - run: | - COMPOSE_FILE=/home/compmanage/docker-compose.yml - OVERRIDE_FILE=/tmp/ttmt-frontend.override.yml - cat > $OVERRIDE_FILE < $OVERRIDE_FILE <