Update build.yml

This commit is contained in:
Max W. 2024-03-02 23:43:00 +01:00
parent 4a05ffba95
commit 1ed16871d3

View File

@ -6,47 +6,15 @@ on:
- '**'
jobs:
build-jar:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'adopt'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'node' # Use latest version
npm-version: 'latest'
- name: Build frontend
run: |
cd frontend
npm install
npm run build
cd ..
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build .jar with Gradle
run: ./gradlew clean bootJar
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: jar-artifact
path: build/libs/*.jar
build-docker-image:
runs-on: ubuntu-22.04
needs: build-jar
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract tag name
run: |
GIT_TAG=$(git tag --points-at HEAD)
@ -72,9 +40,6 @@ jobs:
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin -y
- name: Checkout
uses: actions/checkout@v4
- name: Download Artifact
uses: actions/download-artifact@v3
with: