ubuntu
Some checks failed
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (push) Failing after 0s
checks / Set up Java for Backend Tests and Build (push) Failing after 4s
Gitea Actions Demo / Explore-Gitea-Actions (pull_request) Failing after 0s
Gitea Actions Demo / Explore-Gitea-Actions-2 (pull_request) Failing after 0s
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (pull_request) Failing after 1s
checks / Set up Java for Backend Tests and Build (pull_request) Failing after 4s
Some checks failed
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (push) Failing after 0s
checks / Set up Java for Backend Tests and Build (push) Failing after 4s
Gitea Actions Demo / Explore-Gitea-Actions (pull_request) Failing after 0s
Gitea Actions Demo / Explore-Gitea-Actions-2 (pull_request) Failing after 0s
checks / Set up Node and other necessary dependencies for Frontend Tests and Build (pull_request) Failing after 1s
checks / Set up Java for Backend Tests and Build (pull_request) Failing after 4s
This commit is contained in:
@ -103,35 +103,28 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Detect package manager
|
echo "Detected Ubuntu/Debian, preparing apt sources..."
|
||||||
if command -v apt-get &> /dev/null; then
|
|
||||||
echo "Debian/Ubuntu detected, using apt-get..."
|
|
||||||
apt-get update -qq
|
|
||||||
apt-get install -y -qq wget curl ca-certificates gnupg software-properties-common
|
|
||||||
wget -q https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb
|
|
||||||
apt install -y -qq ./jdk-21_linux-x64_bin.deb
|
|
||||||
|
|
||||||
elif command -v apk &> /dev/null; then
|
# Rebuild sources list in case it’s empty (common in slim containers)
|
||||||
echo "Alpine detected, using apk..."
|
if [ ! -s /etc/apt/sources.list ]; then
|
||||||
apk update >/dev/null
|
echo "Rebuilding /etc/apt/sources.list..."
|
||||||
apk add --no-cache openjdk21 wget curl ca-certificates >/dev/null
|
echo "deb http://archive.ubuntu.com/ubuntu/ noble main universe restricted multiverse" > /etc/apt/sources.list
|
||||||
|
echo "deb http://archive.ubuntu.com/ubuntu/ noble-updates main universe restricted multiverse" >> /etc/apt/sources.list
|
||||||
elif command -v yum &> /dev/null; then
|
echo "deb http://archive.ubuntu.com/ubuntu/ noble-security main universe restricted multiverse" >> /etc/apt/sources.list
|
||||||
echo "RHEL/CentOS detected, using yum..."
|
|
||||||
yum install -y -q wget curl ca-certificates gnupg2 >/dev/null
|
|
||||||
|
|
||||||
elif command -v dnf &> /dev/null; then
|
|
||||||
echo "Fedora detected, using dnf..."
|
|
||||||
dnf install -y -q wget curl ca-certificates gnupg2 >/dev/null
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "No supported package manager found!"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify installation
|
echo "Updating package lists..."
|
||||||
java -version
|
apt-get update -y -qq
|
||||||
|
|
||||||
|
echo "Installing dependencies silently..."
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq wget curl ca-certificates gnupg software-properties-common
|
||||||
|
|
||||||
|
echo "Downloading and installing Oracle JDK 21..."
|
||||||
|
wget -q https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb
|
||||||
|
apt install -y -qq ./jdk-21_linux-x64_bin.deb
|
||||||
|
|
||||||
|
echo "Verifying Java installation..."
|
||||||
|
java -version
|
||||||
|
|
||||||
- name: Set up Java 21 and Maven
|
- name: Set up Java 21 and Maven
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user