From 22a57bdc371686ea81a21b57617b5874232c3516 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 5 Nov 2023 22:10:03 +0100 Subject: [PATCH 1/7] Test maven test --- .gitea/workflows/demo.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index d67ac59..80550d6 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -6,14 +6,14 @@ jobs: Explore-Gitea-Actions: runs-on: ubuntu-latest steps: - - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - name: Check out repository code - uses: actions/checkout@v3 - - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ gitea.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - run: mvn --batch-mode --update-snapshots verify + - run: mkdir staging && cp target/*.jar staging + - uses: actions/upload-artifact@v3 + with: + name: Package + path: staging From bfc5a324f8addc4b32d9d3d643a1572801d6aeb1 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 5 Nov 2023 22:20:04 +0100 Subject: [PATCH 2/7] Use github action template --- .gitea/workflows/demo.yaml | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 80550d6..ad59c58 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -1,19 +1,29 @@ -name: Gitea Actions Demo -run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 -on: [push] +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Java CI with Maven jobs: - Explore-Gitea-Actions: + build: + runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' - - run: mvn --batch-mode --update-snapshots verify - - run: mkdir staging && cp target/*.jar staging - - uses: actions/upload-artifact@v3 - with: - name: Package - path: staging + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml + + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 \ No newline at end of file From 2332478661fd9caeb47d4f1a165f2f78d090d5e7 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 5 Nov 2023 22:23:08 +0100 Subject: [PATCH 3/7] Fix missing push --- .gitea/workflows/demo.yaml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index ad59c58..44579f2 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -1,12 +1,7 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Java CI with Maven +name: Gitea Actions Demo +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: [push] jobs: build: From caf0dc0b755d71d268b60543dfbed3d2cec05fab Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 5 Nov 2023 22:23:28 +0100 Subject: [PATCH 4/7] Fix doppelname --- .gitea/workflows/demo.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 44579f2..3d16734 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -1,5 +1,4 @@ name: Java CI with Maven -name: Gitea Actions Demo run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 on: [push] From 4a59352435945fe2e0e434bdd2c48d3ebd5042ad Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 5 Nov 2023 22:25:48 +0100 Subject: [PATCH 5/7] Include maven installation in actions --- .gitea/workflows/demo.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 3d16734..e6c4c3d 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -15,6 +15,10 @@ jobs: java-version: '17' distribution: 'temurin' cache: maven + - name: Set up Maven + uses: stCarolas/setup-maven@v4.5 + with: + maven-version: 3.8.2 - name: Build with Maven run: mvn -B package --file pom.xml From d1b8f98f8e437b83fd47318e34ea9fea9955caf7 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 5 Nov 2023 22:28:46 +0100 Subject: [PATCH 6/7] (Hopefully) Fix pom location --- .gitea/workflows/demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index e6c4c3d..788ab10 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -20,7 +20,7 @@ jobs: with: maven-version: 3.8.2 - name: Build with Maven - run: mvn -B package --file pom.xml + run: mvn -B package --file backend/pom.xml # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - name: Update dependency graph From 91c24fa288e75aaa96951b2106b0cd4c5ccb4c35 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 5 Nov 2023 22:33:00 +0100 Subject: [PATCH 7/7] Skip uploading dependency graph --- .gitea/workflows/demo.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 788ab10..21b19b8 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -23,5 +23,5 @@ jobs: run: mvn -B package --file backend/pom.xml # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - - name: Update dependency graph - uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 \ No newline at end of file + # - name: Update dependency graph + #uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 \ No newline at end of file