Compare commits
31 Commits
2b607bacec
...
renovate/n
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bdea8d807 | ||
|
|
f88759ee64 | ||
|
|
7132940874 | ||
|
|
bff962af46 | ||
|
|
642bc67fe3 | ||
|
|
6c1de86ad9 | ||
|
|
82a139a6a1 | ||
|
|
a980a69908 | ||
|
|
0c0cb791ce | ||
|
|
780c672e56 | ||
|
|
03665f5556 | ||
|
|
e805f12a9d | ||
|
|
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:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
IMAGE_NAME: "jdrbot"
|
||||
@@ -17,7 +17,14 @@ jobs:
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- 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
|
||||
uses: https://gitea.skydust.fr/actions/docker-login-skydust@main
|
||||
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
|
||||
COPY . /app
|
||||
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"
|
||||
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/*
|
||||
|
||||
COPY --from=builder /app/build/libs/JdrBot.jar /app/JdrBot.jar
|
||||
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 {
|
||||
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 'ws.schild:jave-all-deps:3.3.1'
|
||||
implementation 'com.google.guava:guava:31.1-jre'
|
||||
implementation 'com.github.oshi:oshi-core:6.1.6'
|
||||
implementation 'ws.schild:jave-all-deps:3.5.0'
|
||||
implementation 'com.google.guava:guava:33.4.8-jre'
|
||||
implementation 'com.github.oshi:oshi-core:6.8.2'
|
||||
implementation 'com.github.oshi:oshi-json:3.13.6'
|
||||
implementation 'org.slf4j:slf4j-simple:2.0.9'
|
||||
implementation 'org.apache.commons:commons-lang3:3.12.0'
|
||||
implementation 'dev.arbjerg:lavaplayer:2.0.1'
|
||||
implementation 'net.dv8tion:JDA:5.0.0-beta.13'
|
||||
implementation 'org.slf4j:slf4j-simple:2.0.17'
|
||||
implementation 'org.apache.commons:commons-lang3:3.18.0'
|
||||
implementation 'dev.arbjerg:lavaplayer:2.2.4'
|
||||
implementation 'net.dv8tion:JDA:6.1.3'
|
||||
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
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
24
gradlew
vendored
24
gradlew
vendored
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (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.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -84,7 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# 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.
|
||||
MAX_FD=maximum
|
||||
@@ -112,7 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -145,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# 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 ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@@ -153,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# 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" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -202,16 +204,16 @@ fi
|
||||
# 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"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
26
gradlew.bat
vendored
26
gradlew.bat
vendored
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
@@ -57,22 +59,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
Reference in New Issue
Block a user