mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 06:45:50 +00:00
Implement deployment automation
This commit is contained in:
parent
d95ea7b11f
commit
6f1e05bc79
2 changed files with 22 additions and 2 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
24
.github/workflows/ci.yml
vendored
24
.github/workflows/ci.yml
vendored
|
@ -47,5 +47,25 @@ jobs:
|
|||
name: code-coverage-report
|
||||
path: target/site/jacoco/**
|
||||
|
||||
# - name: Run Deployment
|
||||
# run: java -jar target/spring-petclinic-3.3.0-SNAPSHOT.jar
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
||||
|
||||
- name: Build Docker Image
|
||||
run: docker build -t samanthayeep/petclinic-app:latest .
|
||||
|
||||
- name: Push Docker Image
|
||||
run: docker push samanthayeep/petclinic-app:latest
|
||||
|
||||
# Deploy step may need adjustment based on your deployment strategy
|
||||
- name: Deploy Docker Container
|
||||
run: docker run -d -p 8082:8082 samanthayeep/petclinic-app:latest
|
||||
|
|
Loading…
Reference in a new issue