diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e01aa22..861a348 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -44,17 +44,28 @@ jobs: - name: Compute lowercase owner run: echo "OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push ApiService - run: | - docker build -f Celleseum.ApiService/Dockerfile -t ghcr.io/$OWNER_LC/celleseum-apiservice:latest -t ghcr.io/$OWNER_LC/celleseum-apiservice:${{ github.sha }} . - docker push ghcr.io/$OWNER_LC/celleseum-apiservice:latest - docker push ghcr.io/$OWNER_LC/celleseum-apiservice:${{ github.sha }} + uses: docker/build-push-action@v6 + with: + context: . + file: Celleseum.ApiService/Dockerfile + push: true + tags: | + ghcr.io/${{ env.OWNER_LC }}/celleseum-apiservice:latest + ghcr.io/${{ env.OWNER_LC }}/celleseum-apiservice:${{ github.sha }} - name: Build and push Web - run: | - docker build -f Celleseum.Web/Dockerfile -t ghcr.io/$OWNER_LC/celleseum-web:latest -t ghcr.io/$OWNER_LC/celleseum-web:${{ github.sha }} . - docker push ghcr.io/$OWNER_LC/celleseum-web:latest - docker push ghcr.io/$OWNER_LC/celleseum-web:${{ github.sha }} + uses: docker/build-push-action@v6 + with: + context: . + file: Celleseum.Web/Dockerfile + push: true + tags: | + ghcr.io/${{ env.OWNER_LC }}/celleseum-web:latest + ghcr.io/${{ env.OWNER_LC }}/celleseum-web:${{ github.sha }} - name: Upload compose file to VM uses: appleboy/scp-action@v1.0.0