WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Azure Web App Container Deployment



on:
push:
branches:
- CISetupFeature # Change this to your default branch



jobs:
build-and-deploy:
runs-on: ubuntu-latest



steps:
- name: Checkout code
uses: actions/checkout@v2



- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven



# - name: Skip TEST Maven
# run: mvn install -Dmaven.test.skip=true



- name: Build with Maven
run: mvn -B package --file pom.xml



- name: Set up Docker
uses: azure/docker-login@v1
with:
login-server: https://hub.docker.com/
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}



# - name: Build and push Docker image
# run: |
# docker build -t harshgaurav/shell-java-app:0.0.1.Release .
# docker push harshgaurav/shell-java-app:0.0.1.Release



- name: Build Docker Image
run: docker build -t harshgaurav/harshgaurav-java-app:0.0.1.Release .



- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}



- name: Push Docker Image
run: docker push harshgaurav/harshgaurav-java-app:0.0.1.Release
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM openjdk:17.0.2-slim
EXPOSE 80
ARG JAR=target/spring-petclinic-3.1.0-SNAPSHOT.jar
COPY $JAR /app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
1 change: 1 addition & 0 deletions src/main/resources/banner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
==================================================================/_/_/_/

:: Built with Spring Boot :: ${spring-boot.version}
:: NEW AUTHOR ADDITION = Harsh Gaurav :: (New change committed in feature branch)