-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from KNU-HAEDAL-Website/chore-dockerhub-cicd-i…
…ssue-23 chore: main에 push시 build및 docker-hub push
- Loading branch information
Showing
8 changed files
with
70 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Backend CI | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x ./gradlew | ||
|
||
- name: Spring Boot Build | ||
run: ./gradlew clean build | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ secrets.DOCKER_USERNAME }}/haedal-web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM openjdk:17 | ||
ARG JAR_FILE=*.jar | ||
ARG JAR_FILE=./build/libs/*.jar | ||
COPY ${JAR_FILE} app.jar | ||
ENTRYPOINT ["java","-jar","/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
spring.data.redis.host=${SPRING_DATA_REDIS_HOST} | ||
spring.data.redis.port=${SPRING_DATA_REDIS_PORT} | ||
spring.data.redis.password=${SPRING_DATA_REDIS_PASSWORD} | ||
|
||
spring.datasource.url=${SPRING_DATASOURCE_URL} | ||
spring.datasource.username=${SPRING_DATASOURCE_USERNAME} | ||
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD} | ||
spring.jpa.hibernate.ddl-auto=update | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
spring.jwt.secret=${SPRING_JWT_SECRET_KEY} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
spring.profiles.include=db, jwt | ||
spring.profiles.include=db, jwt | ||
|
||
#logging.level.org.springframework=DEBUG | ||
#spring.mvc.log-request-details=true |