diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ea126a6..aba0dd8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,25 +25,25 @@ jobs: - name: Build the application run: | mvn clean - mvn -B package --file pom.xml + mvn -B package --file pom.xml # Ned til hit var første bolk - og det funka - # - name: Build Docker Image - # uses: docker/build-push-action@v2 - # with: - # context: . - # dockerfile: Dockerfile - # push: false - # tags: ${{ secrets.DOCKER_HUB_USERNAME }}/spring-boot-for-beginners:today - # - name: Login to Docker Hub - # uses: docker/login-action@v1 - # with: - # username: ${{ secrets.DOCKER_HUB_USERNAME }} - # password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Build Docker Image + uses: docker/build-push-action@v2 + with: + context: . + dockerfile: Dockerfile + push: false + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/spring-boot-for-beginners:latest + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - # - name: Push to Docker Hub - # uses: docker/build-push-action@v2 - # with: - # context: . - # dockerfile: Dockerfile - # push: true - # tags: ${{ secrets.DOCKER_HUB_USERNAME }}/spring-boot-for-beginners:today \ No newline at end of file + - name: Push to Docker Hub + uses: docker/build-push-action@v2 + with: + context: . + dockerfile: Dockerfile + push: true + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/spring-boot-for-beginners:latest \ No newline at end of file