[Snyk] Security upgrade net.dv8tion:JDA from 4.4.1_353 to 5.0.2 #551
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CodeQL" | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: ["master"] | |
jobs: | |
analyze: | |
name: Tests | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ["java"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: 18 | |
cache: "maven" | |
- name: Install Mysql | |
uses: mirromutth/[email protected] | |
with: | |
host port: 3306 # Optional, default value is 3306. The port of host | |
container port: 3306 # Optional, default value is 3306. The port of container | |
character set server: "utf8" # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld | |
collation server: "utf8_general_ci" # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld | |
mysql version: "8.0" # Optional, default value is "latest". The version of the MySQL | |
mysql database: "whitelist_dmc" # Optional, default value is "test". The specified database which will be create | |
mysql user: "whitelist_dmc" # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too | |
mysql password: mysql # Required if "mysql user" exists. The password for the "mysql user" | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:${{matrix.language}}" | |
- name: "Deploying plugin to server" | |
run: | | |
cd /home/runner/work/Minecraft-Whitelist-Discord-Bot/Minecraft-Whitelist-Discord-Bot/ | |
mkdir -p server_test/plugins/WhitelistDmc | |
echo Target jar: | |
ls target | |
cp -f target/Whitelist*.jar server_test/plugins/ | |
echo Plugins: | |
ls server_test/plugins/ | |
- name: Seed Database | |
run: | | |
cd /home/runner/work/Minecraft-Whitelist-Discord-Bot/Minecraft-Whitelist-Discord-Bot/ | |
cp -f flyaway.conf.example flyaway.conf | |
mvn flyway:baseline | |
mvn flyway:migrate | |
- name: Replace Discord® Token | |
env: | |
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} | |
run: | | |
cd /home/runner/work/Minecraft-Whitelist-Discord-Bot/Minecraft-Whitelist-Discord-Bot/server_test/plugins/WhitelistDmc | |
export search="botToken:.*." | |
export replace="botToken: $DISCORD_TOKEN" | |
cp config.yml config.tmp.yml | |
sed "s/$search/$replace/g" config.tmp.yml > config.yml | |
rm config.tmp.yml | |
- name: "Mc® Server launch" | |
run: | | |
cd /home/runner/work/Minecraft-Whitelist-Discord-Bot/Minecraft-Whitelist-Discord-Bot/server_test | |
java -jar paper.jar nogui | |