This commit is contained in:
@@ -18,6 +18,7 @@ jobs:
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: "oracle"
|
||||
java-version: "17"
|
||||
|
||||
- name: Verify Maven installation
|
||||
@@ -38,7 +39,7 @@ jobs:
|
||||
# 5. Build the Docker image using docker-compose
|
||||
- name: Build and Package Docker Image
|
||||
run: |
|
||||
docker-compose build
|
||||
docker build -t tea.zendric.de/zendric/XpenselyServer:1.0.0 .
|
||||
|
||||
# 6. Start the application with dependencies
|
||||
- name: Start the Docker Compose Application
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
name: Build and Deploy Spring Boot Server
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
# 1. Checkout the code
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# 2. Set up Java and Maven
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: "17"
|
||||
|
||||
- name: Verify Maven installation
|
||||
run: |
|
||||
mvn -version
|
||||
|
||||
# 3. Build the Spring Boot application
|
||||
- name: Build Spring Boot Application
|
||||
run: |
|
||||
mvn clean package -DskipTests
|
||||
|
||||
# 4. Set up Docker
|
||||
- name: Set up Docker
|
||||
run: |
|
||||
docker --version
|
||||
docker-compose --version
|
||||
|
||||
# 5. Build the Docker image using docker-compose
|
||||
- name: Build and Package Docker Image
|
||||
run: |
|
||||
docker-compose build
|
||||
|
||||
# 6. Start the application with dependencies
|
||||
- name: Start the Docker Compose Application
|
||||
run: |
|
||||
docker-compose up -d
|
||||
Reference in New Issue
Block a user