Skip to content

Commit

Permalink
refactor(CI): JDK 버전을 고려하여 캐싱을 처리하도록 확장
Browse files Browse the repository at this point in the history
  • Loading branch information
limehee committed Dec 4, 2024
1 parent d7f6ea3 commit 6d0bf42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/actions/setup-java-and-gradlew/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ runs:
VERSION="${{ inputs.java-version }}"
PACKAGE="${{ inputs.java-package }}"
DISTRIBUTION_CAPITALIZED="$(echo "${DISTRIBUTION:0:1}" | tr '[:lower:]' '[:upper:]')${DISTRIBUTION:1}"
CACHE_PATH="/opt/hostedtoolcache/Java_${DISTRIBUTION_CAPITALIZED}_${PACKAGE}/${VERSION}*"
echo "CACHE_KEY=java-${DISTRIBUTION}-${VERSION}-${PACKAGE}-${{ runner.os }}" >> $GITHUB_ENV
CACHE_PATH="/opt/hostedtoolcache/Java_${DISTRIBUTION_CAPITALIZED}_${PACKAGE}/${VERSION}*/x64"
CACHE_KEY="java-${DISTRIBUTION}-${VERSION}-${PACKAGE}-${{ runner.os }}"
echo "CACHE_PATH=${CACHE_PATH}" >> $GITHUB_ENV
echo "CACHE_KEY=${CACHE_KEY}" >> $GITHUB_ENV
shell: bash

- name: Restore JDK Cache
Expand Down

0 comments on commit 6d0bf42

Please sign in to comment.