diff --git a/.github/actions/deploy-debian-11/action.yml b/.github/actions/deploy-debian-11/action.yml new file mode 100644 index 00000000..7b00c9d8 --- /dev/null +++ b/.github/actions/deploy-debian-11/action.yml @@ -0,0 +1,19 @@ +name: Deploy on Debian 11 +runs: + using: composite + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Ant Media Server + shell: bash + run: | + apt-get update + apt-get -y install wget findutils unzip curl + curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) + bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false + /usr/local/antmedia/antmedia start + sleep 40 + if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then + echo "LiveApp started log does not exist. Check the logs above" + exit 1; + fi; diff --git a/.github/actions/deploy-debian-12/action.yml b/.github/actions/deploy-debian-12/action.yml new file mode 100644 index 00000000..66f24c80 --- /dev/null +++ b/.github/actions/deploy-debian-12/action.yml @@ -0,0 +1,19 @@ +name: Deploy on Debian 12 +runs: + using: composite + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Ant Media Server + shell: bash + run: | + apt-get update + apt-get -y install wget findutils unzip curl + curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) + bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false + /usr/local/antmedia/antmedia start + sleep 40 + if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then + echo "LiveApp started log does not exist. Check the logs above" + exit 1; + fi; diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml new file mode 100644 index 00000000..2ad4b940 --- /dev/null +++ b/.github/workflows/debian.yml @@ -0,0 +1,16 @@ +name: Debian +on: [push] + +jobs: + Debian11: + runs-on: ubuntu-24.04 + container: debian:11 + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/deploy-debian-11 + Debian12: + runs-on: ubuntu-24.04 + container: debian:12 + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/deploy-debian-12 diff --git a/install_ant-media-server.sh b/install_ant-media-server.sh index 7d5635fd..71005f4d 100755 --- a/install_ant-media-server.sh +++ b/install_ant-media-server.sh @@ -176,13 +176,13 @@ distro () { $SUDO apt-get update && $SUDO apt-get install coreutils CUSTOM_JVM=$DEFAULT_JAVA fi - elif [ "$ID" == "ubuntu" ] || [ "$ID" == "centos" ] || [ "$ID" == "rocky" ] || [ "$ID" == "almalinux" ] || [ "$ID" == "rhel" ]; then + elif [ "$ID" == "ubuntu" ] || [ "$ID" == "centos" ] || [ "$ID" == "rocky" ] || [ "$ID" == "almalinux" ] || [ "$ID" == "rhel" ] || [ "$ID" == "debian" ]; then if [ "$VERSION_ID" == "18.04" ] && [ "aarch64" == $ARCH ]; then echo -e "ARM architecture is supported on Ubuntu 20.04. For 18.04 installation, use the link below to install.\nhttps://github.com/ant-media/Ant-Media-Server/wiki/Frequently-Asked-Questions#how-can-i-install-the-ant-media-server-on-ubuntu-1804-with-arm64" exit 1 fi - if [[ $VERSION_ID != 18.04 ]] && [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]]; then + if [[ $VERSION_ID != 18.04 ]] && [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]] && [[ $VERSION_ID != 11 ]]; then echo $msg exit 1 fi @@ -262,7 +262,7 @@ if [ "$UPDATE" == "true" ]; then fi if [ -z "$ANT_MEDIA_SERVER_ZIP_FILE" ]; then - if [ "$ID" == "ubuntu" ]; then + if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then #Added curl package for the minimal OS installations. $SUDO apt-get update $SUDO apt-get install jq curl -y @@ -312,7 +312,7 @@ fi REQUIRED_VERSION="2.6" -if [ "$ID" == "ubuntu" ]; then +if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then $SUDO apt-get update -y $SUDO apt-get install unzip zip libva-drm2 libva-x11-2 libvdpau-dev -y $SUDO unzip -o $ANT_MEDIA_SERVER_ZIP_FILE "ant-media-server/ant-media-server.jar" -d /tmp/ @@ -359,7 +359,7 @@ check if [[ $VERSION == 2.1\.+.* || $VERSION == 2.0* || $VERSION == 1.* ]]; then - if [ "$ID" == "ubuntu" ]; then + if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then $SUDO apt-get install openjdk-8-jre -y $SUDO apt purge openjfx libopenjfx-java libopenjfx-jni -y $SUDO apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 -y @@ -377,14 +377,14 @@ if [[ $VERSION == 2.1\.+.* || $VERSION == 2.0* || $VERSION == 1.* ]]; then elif [[ $VERSION == 2.4* || $VERSION == 2.3* || $VERSION == 2.2* ]]; then - if [ "$ID" == "ubuntu" ]; then + if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then $SUDO apt-get update -y $SUDO apt-get install openjdk-11-jdk -y check fi elif [[ $VERSION == 2.5* || $VERSION == 2.6* || $VERSION == 2.7* ]]; then - if [ "$ID" == "ubuntu" ]; then + if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then $SUDO apt-get update -y $SUDO apt-get install openjdk-11-jre-headless -y check @@ -400,7 +400,7 @@ elif [[ $VERSION == 2.5* || $VERSION == 2.6* || $VERSION == 2.7* ]]; then else # with 2.8 we start to use java17 - if [ "$ID" == "ubuntu" ]; then + if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then $SUDO apt-get update -y $SUDO apt-get install openjdk-17-jre-headless -y check