feature/setup-workflow-pipeline: add lombok, add gitea workflow #2
@ -98,6 +98,41 @@ jobs:
|
|||||||
git clone --quiet "$CLONE_URL_WITH_AUTH" .
|
git clone --quiet "$CLONE_URL_WITH_AUTH" .
|
||||||
echo "${{ gitea.repository }} cloned successfully."
|
echo "${{ gitea.repository }} cloned successfully."
|
||||||
|
|
||||||
|
- name: Install OpenJDK 21
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Check if apt-get exists; if not, install it
|
||||||
|
if ! command -v apt-get &> /dev/null; then
|
||||||
|
echo "apt-get not found. Attempting to install..."
|
||||||
|
if command -v apk &> /dev/null; then
|
||||||
|
echo "Using apk to install apt (Alpine detected)..."
|
||||||
|
apk update
|
||||||
|
apk add --no-cache apt
|
||||||
|
elif command -v dnf &> /dev/null; then
|
||||||
|
echo "Using dnf (Fedora/RHEL detected)..."
|
||||||
|
dnf install -y apt
|
||||||
|
elif command -v yum &> /dev/null; then
|
||||||
|
echo "Using yum (CentOS/RHEL detected)..."
|
||||||
|
yum install -y apt
|
||||||
|
else
|
||||||
|
echo "No supported package manager found!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Continue installation using apt-get
|
||||||
|
apt-get update -y
|
||||||
|
apt-get install -y apt-transport-https ca-certificates curl gnupg wget software-properties-common
|
||||||
|
|
||||||
|
# Download and install Oracle JDK 21
|
||||||
|
wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.deb
|
||||||
|
apt install -y ./jdk-21_linux-x64_bin.deb
|
||||||
|
|
||||||
|
# Verify installation
|
||||||
|
java -version
|
||||||
|
|
||||||
- name: Set up Java 21 and Maven
|
- name: Set up Java 21 and Maven
|
||||||
run: |
|
run: |
|
||||||
if command -v act >/dev/null 2>&1; then
|
if command -v act >/dev/null 2>&1; then
|
||||||
|
|||||||
Reference in New Issue
Block a user