From 457e65a5d118fbbbf811c3965382c3f4851eeb3c Mon Sep 17 00:00:00 2001 From: Danish Joseph Date: Tue, 16 Jul 2024 06:05:02 +0200 Subject: [PATCH] fix: add condition for docker publish --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c9c645..dbd362d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,9 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} + - name: Install test dependencies + run: yarn install --production=false --only=dev + - name: Build Docker image run: | yarn nx run backend:docker-build --tag=${{ secrets.DOCKER_HUB_USERNAME }}/stockdog:v-${{ steps.version.outputs.VERSION }} @@ -71,6 +74,7 @@ jobs: name: Push Docker image to DockerHub needs: build runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - name: Download Docker image uses: actions/download-artifact@v3