Skip to content

Commit b70b170

Browse files
committed
[test] setup ci 과정 통합
1 parent cf06b96 commit b70b170

File tree

1 file changed

+9
-50
lines changed

1 file changed

+9
-50
lines changed

.github/workflows/deploy-dev.yml

Lines changed: 9 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,15 @@ on:
99
permissions: write-all
1010

1111
jobs:
12-
setup:
13-
runs-on: ubuntu-latest
14-
outputs:
15-
cache-key: ${{ steps.cache-key.outputs.value }}
16-
steps:
17-
- name: 리포지토리를 가져옵니다
18-
uses: actions/checkout@v4
19-
with:
20-
submodules: true
21-
token: ${{ secrets.SUBMODULE_TOKEN }}
22-
23-
- name: Generate cache key
24-
id: cache-key
25-
run: |
26-
echo "value=${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}" >> $GITHUB_OUTPUT
27-
28-
- name: JDK 21을 설치합니다
29-
uses: actions/setup-java@v4
30-
with:
31-
java-version: '21'
32-
distribution: 'temurin'
33-
34-
- name: Gradle 캐싱
35-
uses: actions/cache@v3
36-
with:
37-
path: |
38-
~/.gradle/caches
39-
~/.gradle/wrapper
40-
key: ${{ steps.cache-key.outputs.value }}
41-
restore-keys: |
42-
${{ runner.os }}-gradle-
43-
44-
- name: gradlew 파일에 실행 권한을 부여합니다
45-
run: chmod +x gradlew
46-
47-
build:
48-
needs: setup
12+
build-and-push:
4913
runs-on: ubuntu-latest
5014
env:
5115
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
5216
DOCKER_DEV_REPO: ${{ secrets.DOCKER_DEV_REPO }}
5317
CONTAINER_PORT_DEV: ${{ secrets.CONTAINER_PORT_DEV }}
5418
steps:
55-
- uses: actions/checkout@v4
19+
- name: 리포지토리를 가져옵니다
20+
uses: actions/checkout@v4
5621
with:
5722
submodules: true
5823
token: ${{ secrets.SUBMODULE_TOKEN }}
@@ -62,29 +27,23 @@ jobs:
6227
with:
6328
java-version: '21'
6429
distribution: 'temurin'
65-
66-
- name: Gradle 캐싱
67-
uses: actions/cache@v3
68-
with:
69-
path: |
70-
~/.gradle/caches
71-
~/.gradle/wrapper
72-
key: ${{ needs.setup.outputs.cache-key }}
73-
restore-keys: |
74-
${{ runner.os }}-gradle-
30+
cache: 'gradle'
7531

7632
- name: 도커 로그인
7733
uses: docker/login-action@v3
7834
with:
7935
username: ${{ secrets.DOCKER_USERNAME }}
8036
password: ${{ secrets.DOCKER_PASSWORD }}
8137

38+
- name: gradlew 파일에 실행 권한을 부여합니다
39+
run: chmod +x gradlew
40+
8241
- name: Jib를 사용하여 도커 이미지 빌드 및 푸시
8342
run: |
84-
./gradlew jib
43+
./gradlew jib --console=plain
8544
8645
deploy:
87-
needs: build
46+
needs: build-and-push
8847
runs-on: ubuntu-latest
8948
env:
9049
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}

0 commit comments

Comments
 (0)