Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
step to: deploye til docker
  • Loading branch information
AnneAbelseth committed Nov 4, 2024
1 parent 719c73c commit 2041520
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- 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

0 comments on commit 2041520

Please sign in to comment.