Skip to content

Commit

Permalink
Fix/37 CD workflow 수정 (#38)
Browse files Browse the repository at this point in the history
* Fix: CD workflow 수정

- 빌드 환경 설정을 추가하여 이미지 생성 에러를 해결

* Refactor: CD workflow 수정

- node20 미만 버전의 deprecated에 따라 gradle 캐싱 step의 버전을 v3 -> v4로 업데이트
  • Loading branch information
7zrv authored Nov 24, 2024
1 parent 414a61f commit 37b08bb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,35 @@ on:
jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Github Repository 파일 불러오기
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: JDK 21 버전 설치
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21

- name: Gradle 캐싱
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: 빌드 권한 부여
run: chmod +x ./gradlew
shell: bash

- name: 빌드 및 테스트
run: ./gradlew build

- name: 도커 허브 로그인
run: echo "${{ secrets.DOCKER_ACCESS_TOKEN }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
java-version: 21

- name: Gradle 캐싱
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down

0 comments on commit 37b08bb

Please sign in to comment.