From 7fcde19357e705c0f38d81aa1bd2a7a834493139 Mon Sep 17 00:00:00 2001 From: Nerea Date: Thu, 9 Apr 2026 20:09:56 +0200 Subject: [PATCH 1/4] =?UTF-8?q?a=C3=B1adido=20SonarCloud=20Github=20Action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sonarcloud.yml | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/sonarcloud.yml diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 0000000..b8424a4 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,33 @@ +name: SonarCloud Scan + +on: + push: + branches: [ main ] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + + - name: Cache Sonar + uses: actions/cache@v4 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: mvn -B clean verify sonar:sonar \ + -Dsonar.projectKey=ED1DAM2526_InazumaGo \ + -Dsonar.organization=ed1dam2526 \ + -Dsonar.host.url=https://sonarcloud.io \ No newline at end of file From 377b0866b114cce53877c4767a1f7c019764d483 Mon Sep 17 00:00:00 2001 From: Nerea Date: Thu, 9 Apr 2026 22:27:33 +0200 Subject: [PATCH 2/4] metida dependencia de sonacloud en el pom --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index 12bfc78..887453c 100644 --- a/pom.xml +++ b/pom.xml @@ -81,6 +81,12 @@ + + + org.sonarsource.scanner.maven + sonar-maven-plugin + 3.9.1.2184 + From 5fc5393e33010aa802564ba03e5f6a2cb0e613d3 Mon Sep 17 00:00:00 2001 From: Nerea Date: Thu, 9 Apr 2026 22:46:39 +0200 Subject: [PATCH 3/4] arreglo del fallo de sonar cloud --- .github/workflows/sonarcloud.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index b8424a4..3e85692 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -27,7 +27,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B clean verify sonar:sonar \ + run: | + mvn -B clean verify sonar:sonar \ -Dsonar.projectKey=ED1DAM2526_InazumaGo \ -Dsonar.organization=ed1dam2526 \ - -Dsonar.host.url=https://sonarcloud.io \ No newline at end of file + -Dsonar.host.url=https://sonarcloud.io\ + -Dsonar.login=$SONAR_TOKEN \ No newline at end of file From e93994ac6aec332a81e672dc8910699c89773d61 Mon Sep 17 00:00:00 2001 From: Nerea Date: Thu, 9 Apr 2026 22:50:19 +0200 Subject: [PATCH 4/4] arreglo del fallo de sonar cloud --- .github/workflows/sonarcloud.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 3e85692..bfb1027 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -27,9 +27,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - mvn -B clean verify sonar:sonar \ - -Dsonar.projectKey=ED1DAM2526_InazumaGo \ - -Dsonar.organization=ed1dam2526 \ - -Dsonar.host.url=https://sonarcloud.io\ - -Dsonar.login=$SONAR_TOKEN \ No newline at end of file + run: mvn -B clean verify sonar:sonar -Dsonar.projectKey=ED1DAM2526_InazumaGo -Dsonar.organization=ed1dam2526 -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN \ No newline at end of file