diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index abe41fe..4c0fee7 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -19,36 +19,32 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - # Step 2: Set up Docker Buildx (only if needed on your self-hosted runner) - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - # Step 3: Log in to Docker Hub + # Step 2: Log in to Docker Hub - name: Log in to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} # Store Docker Hub username in GitHub secrets password: ${{ secrets.DOCKER_PASSWORD }} # Store Docker Hub password in GitHub secrets - # Step 4: Build the Backend Docker image + # Step 3: Build the Backend Docker image - name: Build Backend Docker image run: | - docker build --network=host -t jonafoll/backend:${{ github.sha }} ./backend + docker build -t jonafoll/backend:${{ github.sha }} ./backend docker tag jonafoll/backend:${{ github.sha }} jonafoll/backend:latest - # Step 5: Build the Frontend Docker image + # Step 4: Build the Frontend Docker image - name: Build Frontend Docker image run: | - docker build --network=host -t jonafoll/frontend:${{ github.sha }} ./frontend + docker build -t jonafoll/frontend:${{ github.sha }} ./frontend docker tag jonafoll/frontend:${{ github.sha }} jonafoll/frontend:latest - # Step 6: Push the Backend Docker image to Docker Hub + # Step 5: Push the Backend Docker image to Docker Hub - name: Push Backend Docker image to Docker Hub run: | docker push jonafoll/backend:${{ github.sha }} docker push jonafoll/backend:latest - # Step 7: Push the Frontend Docker image to Docker Hub + # Step 6: Push the Frontend Docker image to Docker Hub - name: Push Frontend Docker image to Docker Hub run: | docker push jonafoll/frontend:${{ github.sha }}