Build main Branch #1161
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Build main Branch | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
schedule: | |
- cron: "0 3 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ 11, 17 ] | |
fail-fast: false | |
name: Java ${{ matrix.java }} sample | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/[email protected] | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ matrix.java }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ matrix.java }}-m2 | |
- name: Build Peass (Current dependent project version) | |
run: | | |
branch=main | |
cd /home/runner/work/ && git clone -b $branch https://github.com/DaGeRe/peass.git && cd peass && echo "Branch: $branch" && git rev-parse HEAD && ./mvnw clean install -DskipTests | |
- name: Build with Maven | |
run: | | |
cd /home/runner/work/peass-ci-plugin/peass-ci-plugin/ && ./mvnw -B package --file pom.xml | |
- name: Publish Test Report | |
if: ${{ always() }} | |
uses: scacap/action-surefire-report@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |