Compare commits
19 Commits
2b607bacec
...
v4.2.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd7dfaedaf | ||
|
|
3c0103c4ed | ||
|
|
6c222009b2 | ||
|
|
e077d18760 | ||
|
|
2afc52e858 | ||
| 17a094b727 | |||
|
|
0514110fa0 | ||
|
|
4e49b098da | ||
| c89e740e02 | |||
| 9b82cb2823 | |||
| b1608ee414 | |||
|
|
329435f68f | ||
|
|
3fa6425e99 | ||
|
|
d81eea7a6b | ||
|
|
52a71c6381 | ||
|
|
5749fe8148 | ||
|
|
27818d46bf | ||
|
|
f8aadc6f9e | ||
|
|
7752a00af1 |
@@ -3,8 +3,8 @@ name: Production deployment
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
tags:
|
||||||
- master
|
- 'v*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_NAME: "jdrbot"
|
IMAGE_NAME: "jdrbot"
|
||||||
@@ -17,7 +17,14 @@ jobs:
|
|||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repo's default branch
|
- name: Check out repo's default branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
- name: Getting version
|
||||||
|
uses: https://gitea.skydust.fr/actions/get-version@main
|
||||||
|
- name: Update java package version
|
||||||
|
run: |
|
||||||
|
log_info "Updating gradle.properties version to $(yellow)$NEW_VERSION"
|
||||||
|
sed -Ei "s|^(version=).*|\1${NEW_VERSION}|" gradle.properties
|
||||||
|
cat gradle.properties
|
||||||
- name: Docker login
|
- name: Docker login
|
||||||
uses: https://gitea.skydust.fr/actions/docker-login-skydust@main
|
uses: https://gitea.skydust.fr/actions/docker-login-skydust@main
|
||||||
with:
|
with:
|
||||||
|
|||||||
23
.gitea/workflows/release.yml
Normal file
23
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
semver:
|
||||||
|
type: choice
|
||||||
|
description: Choose the semver
|
||||||
|
options:
|
||||||
|
- "Major - Incompatible API changes"
|
||||||
|
- "Minor - Adding functionality in a backward compatible manner"
|
||||||
|
- "Patch - Backward compatible bug fixes"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: skydust-runner
|
||||||
|
steps:
|
||||||
|
- name: Release
|
||||||
|
uses: https://gitea.skydust.fr/actions/create-release@main
|
||||||
|
with:
|
||||||
|
semver: ${{ inputs.semver }}
|
||||||
|
token: ${{ secrets.CI_TOKEN }}
|
||||||
@@ -1,15 +1,17 @@
|
|||||||
FROM public.ecr.aws/docker/library/eclipse-temurin:20.0.2_9-jdk AS builder
|
FROM public.ecr.aws/docker/library/eclipse-temurin:23.0.1_11-jdk AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN ./gradlew shadowJar
|
RUN ./gradlew shadowJar
|
||||||
|
|
||||||
FROM public.ecr.aws/docker/library/eclipse-temurin:20.0.2_9-jre AS runner
|
FROM public.ecr.aws/docker/library/eclipse-temurin:23.0.1_11-jre AS runner
|
||||||
LABEL authors="skydust"
|
LABEL authors="skydust"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN wget https://repo.zabbix.com/zabbix/7.2/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.2+ubuntu24.04_all.deb
|
||||||
|
RUN dpkg -i zabbix-release_latest_7.2+ubuntu24.04_all.deb && rm zabbix-release_latest_7.2+ubuntu24.04_all.deb
|
||||||
RUN apt update && apt install -y zabbix-sender && rm -rf /var/lib/apt/lists/*
|
RUN apt update && apt install -y zabbix-sender && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=builder /app/build/libs/JdrBot.jar /app/JdrBot.jar
|
COPY --from=builder /app/build/libs/JdrBot.jar /app/JdrBot.jar
|
||||||
COPY start.sh /app
|
COPY start.sh /app
|
||||||
|
|
||||||
CMD ["/bin/bash","./start.sh"]
|
CMD ["/bin/bash","./start.sh"]
|
||||||
|
|||||||
16
build.gradle
16
build.gradle
@@ -26,16 +26,16 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'net.lingala.zip4j:zip4j:2.10.0'
|
implementation 'net.lingala.zip4j:zip4j:2.11.5'
|
||||||
implementation 'club.minnced:opus-java:1.1.1'
|
implementation 'club.minnced:opus-java:1.1.1'
|
||||||
implementation 'ws.schild:jave-all-deps:3.3.1'
|
implementation 'ws.schild:jave-all-deps:3.5.0'
|
||||||
implementation 'com.google.guava:guava:31.1-jre'
|
implementation 'com.google.guava:guava:33.4.0-jre'
|
||||||
implementation 'com.github.oshi:oshi-core:6.1.6'
|
implementation 'com.github.oshi:oshi-core:6.6.6'
|
||||||
implementation 'com.github.oshi:oshi-json:3.13.6'
|
implementation 'com.github.oshi:oshi-json:3.13.6'
|
||||||
implementation 'org.slf4j:slf4j-simple:2.0.9'
|
implementation 'org.slf4j:slf4j-simple:2.0.16'
|
||||||
implementation 'org.apache.commons:commons-lang3:3.12.0'
|
implementation 'org.apache.commons:commons-lang3:3.17.0'
|
||||||
implementation 'dev.arbjerg:lavaplayer:2.0.1'
|
implementation 'dev.arbjerg:lavaplayer:2.2.3'
|
||||||
implementation 'net.dv8tion:JDA:5.0.0-beta.13'
|
implementation 'net.dv8tion:JDA:5.3.0'
|
||||||
implementation 'org.reflections:reflections:0.10.2'
|
implementation 'org.reflections:reflections:0.10.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
20
gradlew
vendored
20
gradlew
vendored
@@ -15,6 +15,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@@ -55,7 +57,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@@ -84,7 +86,7 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@@ -145,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC2039,SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
@@ -153,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC2039,SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
@@ -202,11 +204,11 @@ fi
|
|||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
# Collect all arguments for the java command:
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
# and any embedded shellness will be escaped.
|
||||||
# double quotes to make sure that they get re-expanded; and
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
# * put everything else in single quotes, so that it's not re-expanded.
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
|||||||
22
gradlew.bat
vendored
22
gradlew.bat
vendored
@@ -13,6 +13,8 @@
|
|||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
|||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user