ci: JDK install to runner workdir (no root, cached)
build / Assemble debug APK (push) Failing after 4m15s
build / Assemble debug APK (push) Failing after 4m15s
This commit is contained in:
1 parent
97c3afa86e
commit
b75bbe0c39
1 file changed
+8
-4
@@ -20,12 +20,16 @@ jobs:
|
||||
# Set up JDK 17: download and extract directly (no apt-get, no root needed)
|
||||
- name: Set up JDK 17
|
||||
run: |
|
||||
# Install JDK into the runner's working dir (persists across runs, no root needed)
|
||||
WORKDIR=/tmp/gitea-runner-work
|
||||
if [ ! -d "$WORKDIR/jdk" ]; then
|
||||
wget -q 'https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.13%2B11/OpenJDK17U-jdk_x64_linux_hotspot_17.0.13_11.tar.gz' -O /tmp/jdk.tar.gz
|
||||
mkdir -p /home/gitea/jdk
|
||||
tar -xzf /tmp/jdk.tar.gz -C /home/gitea/jdk --strip-components=1
|
||||
mkdir -p "$WORKDIR/jdk"
|
||||
tar -xzf /tmp/jdk.tar.gz -C "$WORKDIR/jdk" --strip-components=1
|
||||
rm /tmp/jdk.tar.gz
|
||||
echo "JAVA_HOME=/home/gitea/jdk" >> $GITHUB_ENV
|
||||
echo "PATH=/home/gitea/jdk/bin:$PATH" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "JAVA_HOME=$WORKDIR/jdk" >> $GITHUB_ENV
|
||||
echo "PATH=$WORKDIR/jdk/bin:$PATH" >> $GITHUB_ENV
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x repo/gradlew
|
||||
|
||||
Reference in new issue
Block a user