ma jdk ch
Some checks failed
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (push) Successful in 10s
checks / Set up Java for Backend Tests and Build (push) Failing after 13s
Gitea Actions Demo / Explore-Gitea-Actions-2 (pull_request) Successful in 2s
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (pull_request) Successful in 11s
checks / Set up Java for Backend Tests and Build (pull_request) Failing after 13s

This commit is contained in:
Patrick
2025-10-31 15:26:56 +01:00
parent 41957e97de
commit de196ce36a

View File

@ -99,15 +99,14 @@ jobs:
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
# 2⃣ Setup Java from local JDK file
- name: Set up OpenJDK 21
uses: actions/setup-java@v5
with:
distribution: 'jdkfile' # Use locally downloaded JDK
jdkFile: ${{ runner.temp }}/java_package.tar.gz
java-version: '21'
architecture: x64
mvn-toolchain-vendor: 'Oracle'
cache: 'maven' # Enable Maven dependency caching
- name: Download and extract OpenJDK 21
run: |
download_url="https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
mkdir -p $RUNNER_TEMP/jdk
tar -xzf $RUNNER_TEMP/java_package.tar.gz -C $RUNNER_TEMP/jdk --strip-components=1
echo "JAVA_HOME=$RUNNER_TEMP/jdk" >> $GITHUB_ENV
echo "$RUNNER_TEMP/jdk/bin" >> $GITHUB_PATH
# 3⃣ Verify Java installation
- name: Verify Java setup