Skip to content

Commit 3b5560d

Browse files
modified github workflow of catlog-service
1 parent 918a964 commit 3b5560d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/catlog-service.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,16 @@ jobs:
3333

3434
- name: Build with Maven
3535
run: ./mvnw -ntp verify
36+
37+
- if: ${{ github.ref == 'refs/heads/main' }}
38+
- name: Login to Docker Hub
39+
uses: docker/login-action@v3
40+
with:
41+
username: ${{ vars.DOCKERHUB_USERNAME }}
42+
password: ${{ secrets.DOCKERHUB_TOKEN }}
43+
44+
- if: ${{ github.ref == 'refs/heads/main' }}
45+
- name: Build and Publish Docker Image
46+
run : |
47+
./mvnw spring-boot:build-image -DskipTests
48+
docker push ${{ secrets.DOCKER_USERNAME }}/bookstore-catlog-service

0 commit comments

Comments
 (0)