-
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.
- Loading branch information
1 parent
1e47079
commit 23463e1
Showing
6 changed files
with
63 additions
and
5 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,47 @@ | ||
name: githubAction | ||
on: | ||
push: | ||
branches: | ||
- feat/ci-cd | ||
- develop | ||
env: | ||
NAME: user-service | ||
REPO: investing-user-service | ||
working-directory: ./user-service | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 자바 17를 설치합니다. | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: 레디스 실행 | ||
uses: supercharge/[email protected] | ||
with: | ||
redis-version: '6' | ||
|
||
- name: Gradle 명령 실행을 위한 권한을 부여합니다 | ||
run: chmod +x gradlew | ||
working-directory: ${{ env.working-directory }} | ||
|
||
- name: 그래들 빌드를 실행한다. | ||
run: ./gradlew build | ||
working-directory: ${{ env.working-directory }} | ||
|
||
- name: 도커허브에 로그인한다. | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{secrets.DOCKERHUB_USERNAME}} | ||
password: ${{secrets.DOCKERHUB_TOKEN}} | ||
|
||
- name: 도커 빌드 | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./user-service | ||
file: ./user-service/Dockerfile | ||
push: true | ||
tags: ${{secrets.DOCKERHUB_USERNAME}}/${{env.REPO}}:latest |
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,5 @@ | ||
FROM openjdk:17-jdk-slim | ||
|
||
COPY build/libs/user-service-0.0.1-SNAPSHOT.jar 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ pluginManagement { | |
} | ||
} | ||
|
||
rootProject.name = 'user' | ||
rootProject.name = 'user-service' |
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,9 @@ | ||
server: | ||
port: 8080 | ||
|
||
spring: | ||
config: | ||
activate: | ||
on-profile: prod | ||
|
||
import: optional:configserver:https://investing.o-r.kr |