Update .forgejo/workflows/ci.yml
Some checks are pending
Build Resilient App / build (push) Waiting to run
Some checks are pending
Build Resilient App / build (push) Waiting to run
This commit is contained in:
parent
12c5fc6b21
commit
7cd93411b4
1 changed files with 35 additions and 14 deletions
|
@ -1,11 +1,10 @@
|
|||
# .forgejo/workflows/ci.yml
|
||||
name: Build and Cache Maven Project
|
||||
name: Build Resilient App
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master, develop]
|
||||
pull_request:
|
||||
workflow_dispatch: # manual trigger
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -13,15 +12,37 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Build backend + frontend
|
||||
run: |
|
||||
echo "Building backend + frontend"
|
||||
mvn clean install -Pprod -DskipTests
|
||||
git clone "${CI_REPO_URL}" .
|
||||
git checkout "${CI_COMMIT_REF}"
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apk add --no-cache nodejs npm openjdk17 maven git bash
|
||||
|
||||
- name: Set up Java and Node
|
||||
run: |
|
||||
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
|
||||
export PATH=$JAVA_HOME/bin:$PATH
|
||||
node -v
|
||||
npm -v
|
||||
java -version
|
||||
mvn -v
|
||||
|
||||
- name: Install frontend dependencies
|
||||
run: |
|
||||
cd src/main/webapp
|
||||
npm ci
|
||||
|
||||
- name: Build frontend
|
||||
run: |
|
||||
cd src/main/webapp
|
||||
npm run build -- --configuration production
|
||||
|
||||
- name: Build backend (Spring Boot)
|
||||
run: |
|
||||
mvn clean package -Pprod -DskipTests
|
||||
|
||||
- name: List output files
|
||||
run: |
|
||||
ls -lh target/*.jar || true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue