feat: some changes

This commit is contained in:
Luca Burgard 2024-04-25 16:13:05 +02:00
parent 92289b23b2
commit b91691de01
3 changed files with 51 additions and 4 deletions

View File

@ -11,8 +11,6 @@ on:
MAVEN_SECRET:
required: true
permissions: read-all
jobs:
build:
name: Build

View File

@ -0,0 +1,43 @@
on:
workflow_call:
inputs:
name:
type: string
required: true
MAVEN_USER:
type: string
required: true
secrets:
MAVEN_SECRET:
required: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Install Maven
run: sudo apt update && sudo apt-get install maven -y
- name: Prepare Maven credentials
uses: s4u/maven-settings-action@v2.6.0
with:
servers: |
[{
"id": "repo",
"username": "${{ vars.MAVEN_NAME }}",
"password": "${{ secrets.MAVEN_SECRET }}"
}]
- name: Deploy with Maven
run: mvn deploy

View File

@ -11,8 +11,6 @@ on:
MAVEN_SECRET:
required: true
permissions: read-all
jobs:
test:
name: Test
@ -43,3 +41,11 @@ jobs:
- name: Run tests with Maven
run: mvn test
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Tests
path: "**/target/surefire-reports/TEST-*.xml"
reporter: jest-junit