add pipeline3
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Build und Deploy
|
||||
name: "Build und Deploy"
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -9,33 +9,20 @@ jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: node:20-bullseye
|
||||
options: --user=root
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
- name: "🧾 Repository auschecken"
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y unzip curl git
|
||||
curl -s "https://get.sdkman.io" | bash
|
||||
export SDKMAN_DIR="/root/.sdkman"
|
||||
source "$SDKMAN_DIR/bin/sdkman-init.sh"
|
||||
sdk install java 21.0.2-tem
|
||||
sdk install gradle 8.7
|
||||
|
||||
- name: Make Gradle Wrapper Executable
|
||||
- name: "📦 Gradle Wrapper ausführbar machen"
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: Build Project
|
||||
- name: "🛠 Projekt bauen"
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Docker Compose Build and Deploy
|
||||
- name: "🐳 Docker Compose: Build & Deploy"
|
||||
run: |
|
||||
docker compose -f ./compose.yml up -d --build
|
||||
|
||||
- name: Clean up Docker
|
||||
- name: "🧼 Docker Clean-up (optional)"
|
||||
if: always()
|
||||
run: docker system prune -f
|
||||
Reference in New Issue
Block a user