Add github build & verify actions (#1854)

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-10-03 16:45:10 +03:00
committed by GitHub
parent 4bc082599b
commit 2b1f8ea71c

33
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: build
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: Check license
run: mvn license:check --batch-mode
- name: Build with Maven
run: mvn verify javadoc:javadoc --batch-mode
#
# - name: Scan
# if: ${{ BRANCH_NAME == 'master' }}
# run: mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.branch.name=eclipse-master -Dsonar.login=$SONAR_ACCESS_TOKEN --batch-mode