Skip to content

Commit ff79c7f

Browse files
committed
[chore] jib 설정분기
1 parent 430f18f commit ff79c7f

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

.github/workflows/deploy-dev.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
1515
DOCKER_DEV_REPO: ${{ secrets.DOCKER_DEV_REPO }}
1616
CONTAINER_PORT_DEV: ${{ secrets.CONTAINER_PORT_DEV }}
17-
ACTIVE_PROFILE: 'dev'
1817
steps:
1918
- name: 리포지토리를 가져옵니다
2019
uses: actions/checkout@v4
@@ -40,7 +39,7 @@ jobs:
4039

4140
- name: Jib를 사용하여 도커 이미지 빌드 및 푸시
4241
run: |
43-
./gradlew jib --no-daemon --console=plain
42+
./gradlew jib -Dspring.profiles.active=dev --no-daemon --console=plain
4443
4544
deploy:
4645
needs: build-and-push

.github/workflows/deploy-test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
1515
DOCKER_DEV_REPO: ${{ secrets.DOCKER_TEST_REPO }}
1616
CONTAINER_PORT_DEV: ${{ secrets.CONTAINER_PORT_DEV }}
17-
ACTIVE_PROFILE: 'test'
1817
steps:
1918
- name: 리포지토리를 가져옵니다
2019
uses: actions/checkout@v4
@@ -40,7 +39,7 @@ jobs:
4039

4140
- name: Jib를 사용하여 도커 이미지 빌드 및 푸시
4241
run: |
43-
./gradlew jib --no-daemon --console=plain
42+
./gradlew jib -Dspring.profiles.active=test --no-daemon --console=plain
4443
4544
deploy:
4645
needs: build-and-push

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ tasks.register('copySecret', Copy) {
9393

9494
project.ext {
9595
dockerUser = System.getenv('DOCKER_USERNAME')
96-
activeProfile = System.getenv('ACTIVE_PROFILE') ?: 'dev'
9796
containerPort = System.getenv('CONTAINER_PORT') ?: '8081'
97+
activeProfile = System.getProperty('spring.profiles.active') ?: System.getenv('ACTIVE_PROFILE') ?: 'dev'
9898
}
9999

100100

0 commit comments

Comments
 (0)