diff --git a/.gitea/workflows/main-build.yml b/.gitea/workflows/main-build.yml new file mode 100644 index 0000000..329aa96 --- /dev/null +++ b/.gitea/workflows/main-build.yml @@ -0,0 +1,51 @@ +name: Master-Build + +on: + push: + branches: ["master"] + +jobs: + build-war: + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Set up JDK 8 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "8" + + - name: Cache Maven repo + uses: actions/cache@v4 + with: + path: ~/.m2 + key: m2-${{ runner.os }}-${{ hashFiles('**/pom.xml') }} + restore-keys: | + m2-${{ runner.os }}- + + - name: Configure Maven Settings for Nexus + run: | + mkdir -p ~/.m2 + cat > ~/.m2/settings.xml < + + + nexus + ${{ secrets.NEXUS_USERNAME }} + ${{ secrets.NEXUS_PASSWORD }} + + + + EOF + + - name: Maven deploy (WAR to Nexus) + run: mvn -B clean deploy -DskipTests + + - name: Upload WAR artifact (optional) + uses: actions/upload-artifact@v4 + with: + name: sayit-helpdesk-war + path: target/sayit.helpdesk.war diff --git a/.gitea/workflows/pr-ci.yml b/.gitea/workflows/pr-ci.yml new file mode 100644 index 0000000..2d1ee59 --- /dev/null +++ b/.gitea/workflows/pr-ci.yml @@ -0,0 +1,30 @@ +name: PR-CI + +on: + pull_request: + branches: ["master"] + +jobs: + build-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Set up JDK 8 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "8" + + - name: Cache Maven repo + uses: actions/cache@v4 + with: + path: ~/.m2 + key: m2-${{ runner.os }}-${{ hashFiles('**/pom.xml') }} + restore-keys: | + m2-${{ runner.os }}- + + - name: Maven Build (compile + dependency check) + run: mvn -B clean package -DskipTests