From b91691de01ca0c8a84bb073c595e050b4dbc9a15 Mon Sep 17 00:00:00 2001 From: Luca Burgard Date: Thu, 25 Apr 2024 16:13:05 +0200 Subject: [PATCH] feat: some changes --- .gitea/workflows/build-workflow.yml | 2 -- .gitea/workflows/deploy-workflow.yml | 43 ++++++++++++++++++++++++++++ .gitea/workflows/test-workflow.yml | 10 +++++-- 3 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 .gitea/workflows/deploy-workflow.yml diff --git a/.gitea/workflows/build-workflow.yml b/.gitea/workflows/build-workflow.yml index 1367d09..ea62dbf 100644 --- a/.gitea/workflows/build-workflow.yml +++ b/.gitea/workflows/build-workflow.yml @@ -11,8 +11,6 @@ on: MAVEN_SECRET: required: true -permissions: read-all - jobs: build: name: Build diff --git a/.gitea/workflows/deploy-workflow.yml b/.gitea/workflows/deploy-workflow.yml new file mode 100644 index 0000000..6b991ce --- /dev/null +++ b/.gitea/workflows/deploy-workflow.yml @@ -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 diff --git a/.gitea/workflows/test-workflow.yml b/.gitea/workflows/test-workflow.yml index 960253d..801003d 100644 --- a/.gitea/workflows/test-workflow.yml +++ b/.gitea/workflows/test-workflow.yml @@ -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