fix CD part 2
Some checks failed
CI / build-test (push) Successful in 47s
Deploy Staging (Docker) / deploy (push) Failing after 36s

This commit is contained in:
Do Manh Phuong 2026-05-10 23:18:22 +07:00
parent ef4c1944be
commit c56b8fd208

View File

@ -12,9 +12,10 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Build & Save Image - name: Build & Save Image
env:
IMAGE: ${{ secrets.IMAGE_NAME }}
run: | run: |
IMAGE="${{ secrets.IMAGE_NAME }}"
if [ -z "$IMAGE" ]; then IMAGE="ttmt-frontend"; fi
IMAGE=$(echo "$IMAGE" | tr '[:upper:]' '[:lower:]')
docker build --build-arg NODE_VERSION=22.14.0 -t $IMAGE:staging-${{ github.sha }} . 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 }} docker save -o /tmp/ttmt-frontend.tar $IMAGE:staging-${{ github.sha }}
@ -36,7 +37,9 @@ jobs:
key: ${{ secrets.SSH_PRIVATE_KEY }} key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }} port: ${{ secrets.SSH_PORT }}
script: | script: |
IMAGE=${{ secrets.IMAGE_NAME }} IMAGE="${{ secrets.IMAGE_NAME }}"
if [ -z "$IMAGE" ]; then IMAGE="ttmt-frontend"; fi
IMAGE=$(echo "$IMAGE" | tr '[:upper:]' '[:lower:]')
COMPOSE_FILE=/home/compmanage/docker-compose.yml COMPOSE_FILE=/home/compmanage/docker-compose.yml
OVERRIDE_FILE=/tmp/ttmt-frontend.override.yml OVERRIDE_FILE=/tmp/ttmt-frontend.override.yml
docker load -i /tmp/ttmt-frontend.tar docker load -i /tmp/ttmt-frontend.tar