Skip to content

Commit 53a5615

Browse files
committed
Fix: CD workflow 수정
- 빌드 환경 설정을 추가하여 이미지 생성 에러를 해결
1 parent 414a61f commit 53a5615

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/CD.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,35 @@ on:
55
jobs:
66
build-and-push:
77
runs-on: ubuntu-latest
8+
89
steps:
910
- name: Github Repository 파일 불러오기
1011
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: JDK 21 버전 설치
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: temurin
19+
java-version: 21
20+
21+
- name: Gradle 캐싱
22+
uses: actions/cache@v3
23+
with:
24+
path: |
25+
~/.gradle/caches
26+
~/.gradle/wrapper
27+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
28+
restore-keys: |
29+
${{ runner.os }}-gradle-
30+
31+
- name: 빌드 권한 부여
32+
run: chmod +x ./gradlew
33+
shell: bash
34+
35+
- name: 빌드 및 테스트
36+
run: ./gradlew build
1137

1238
- name: 도커 허브 로그인
1339
run: echo "${{ secrets.DOCKER_ACCESS_TOKEN }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin

0 commit comments

Comments
 (0)