Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Run SonarQube with Maven

on: push

name: Code build and review
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Build with Maven cloud
run: mvn -B verify sonar:sonar -Dsonar.projectKey=sonardemo-project-reachability_project1 -Dsonar.organization=sonardemo-project-reachability -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN
buildjob:
runs-on: ubuntu-latest
steps:
- name: Clone the current repository on the runner
uses: actions/checkout@v4
- name: Setup Java 17 and maven
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Build the code
run: mvn -B verify sonar:sonar -Dsonar.projectKey=rutu-demo-githubactions_project-sonar-demo -Dsonar.organization=rutu-demo-githubactions -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}