Merge branch 'dev' into main
Some checks failed
Build rosetta-wss / build (push) Failing after 20s

This commit is contained in:
RoyceDa
2026-03-22 19:39:43 +02:00
2 changed files with 20 additions and 38 deletions

View File

@@ -1,5 +1,6 @@
name: Build rosetta-wss name: Build rosetta-wss
run-name: Build and Deploy WSS run-name: Build and Deploy WSS
on: on:
push: push:
branches: branches:
@@ -9,42 +10,23 @@ on:
jobs: jobs:
build: build:
runs-on: java-builders runs-on: java-builders
steps:
- name: Install Node.js
run: |
if command -v apt-get &> /dev/null; then
sudo apt-get update && sudo apt-get install -y nodejs npm
elif command -v brew &> /dev/null; then
brew install node
fi
container:
image: maven:3.9.9-eclipse-temurin-21
steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Install maven IF not Exists
run: |
if ! command -v mvn &> /dev/null; then
echo "Maven not found, installing..."
if command -v apt-get &> /dev/null; then
sudo apt-get update && sudo apt-get install -y maven
elif command -v brew &> /dev/null; then
brew install maven
fi
else
echo "Maven is already installed."
fi
- name: Build with Maven - name: Build with Maven
run: mvn clean package run: mvn -B clean package
- name: List build directory - name: List build artifacts
run: ls -la build/ run: |
ls -la
ls -la target || true
ls -la build || true
- name: Deploy to server via SSH - name: Deploy to server via SSH
uses: appleboy/scp-action@v1 uses: appleboy/scp-action@v1
with: with:
@@ -58,7 +40,7 @@ jobs:
rm: false rm: false
debug: true debug: true
flatten: true flatten: true
- name: Restart Docker containers - name: Restart Docker containers
uses: appleboy/ssh-action@v1.2.5 uses: appleboy/ssh-action@v1.2.5
with: with:
@@ -68,6 +50,5 @@ jobs:
port: ${{ secrets.WSS_SSH_PORT }} port: ${{ secrets.WSS_SSH_PORT }}
script: | script: |
cd ${{ secrets.WSS_DEPLOY_PATH }} cd ${{ secrets.WSS_DEPLOY_PATH }}
docker-compose down docker compose down
docker compose up -d --build docker compose up -d --build

View File

@@ -7,7 +7,8 @@ public enum AttachmentType {
IMAGE(0), IMAGE(0),
MESSAGES(1), MESSAGES(1),
FILE(2), FILE(2),
AVATAR(3); AVATAR(3),
CALL(4);
private final int code; private final int code;