Browse Source

Fix Build Docker image step

Daniel Bohry 1 year ago
parent
commit
8d524c894d
1 changed files with 8 additions and 1 deletions
  1. 8 1
      .github/workflows/buildAndRelease.yml

+ 8 - 1
.github/workflows/buildAndRelease.yml

@@ -47,7 +47,14 @@ jobs:
           java-version: '21'
           distribution: 'temurin'
       - name: Build the Docker image
-        run: ./gradlew bootBuildImage --no-daemon --info --stacktrace
+        run: ./gradlew build && docker build -t lhamacorp/stocks-be .
+      - name: Login to Docker Hub
+        uses: docker/login-action@v2
+        with:
+          username: ${{ secrets.DOCKERHUB_USERNAME }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+      - name: Push image
+        run: docker push lhamacorp/hellflix
 
   deploy:
     name: Deploy to Server