From 8f1c3902127f206ea45d15ab5dcc45f898ffc779 Mon Sep 17 00:00:00 2001 From: Diego Cornejo Date: Fri, 18 Feb 2022 02:09:15 -0600 Subject: [PATCH] Set sonar-scanner 4.6.2.2472 and added full example to readme (#12) --- .github/workflows/ci.yml | 27 +++++++++++++-------------- README.md | 34 ++++++++++++++++++++-------------- action.yml | 4 ++-- 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96259de..700ebba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,25 +3,24 @@ name: CI on: push: branches: - - master + - master pull_request: branches: - - master + - master jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Setup sonarqube - uses: ./ - - name: run sonarqube - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: sonar-scanner - -Dsonar.login=${{ secrets.SONAR_TOKEN }} - -Dsonar.organization=1corp - -Dsonar.host.url=https://sonarcloud.io/ - -Dsonar.projectKey=sonar-scanner-action + - uses: actions/checkout@v1 + - name: Setup sonarqube + uses: ./ + - name: run sonarqube + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: sonar-scanner + -Dsonar.login=${{ secrets.SONAR_TOKEN }} + -Dsonar.organization=1corp + -Dsonar.host.url=https://sonarcloud.io/ + -Dsonar.projectKey=sonar-scanner-action diff --git a/README.md b/README.md index c7faed0..49c2603 100644 --- a/README.md +++ b/README.md @@ -6,20 +6,26 @@ This action downloads given version of sonar-scanner and adds it to PATH. ### `version` -**Required** sonar-scanner cli version. List of available versions: https://github.com/SonarSource/sonar-scanner-cli/releases. Default `4.2.0.1873`. +**Required** sonar-scanner cli version. List of available versions: https://github.com/SonarSource/sonar-scanner-cli/releases. Default `4.6.2.2472`. -## Example usage +## Full Example usage ```yaml -- name: Setup sonarqube - uses: warchant/setup-sonar-scanner@v3 -- name: Run sonarqube - env: - # to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: sonar-scanner - -Dsonar.login=${{ secrets.SONAR_TOKEN }} - -Dsonar.organization=1corp - -Dsonar.host.url=https://sonarcloud.io/ - -Dsonar.projectKey=sonar-scanner-action -``` +on: push +name: SonarQube +jobs: + sonarQubeTrigger: + name: SonarQube Trigger + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Setup sonarqube + uses: warchant/setup-sonar-scanner@v3 + - name: Run sonarqube + run: sonar-scanner + -Dsonar.organization=1corp + -Dsonar.projectKey=Claro-Club-Mobile + -Dsonar.sources=$GITHUB_WORKSPACE + -Dsonar.host.url=${{ secrets.SONAR_URL }} + -Dsonar.login=${{ secrets.SONAR_TOKEN }} +``` \ No newline at end of file diff --git a/action.yml b/action.yml index 15b86cd..efd17f1 100644 --- a/action.yml +++ b/action.yml @@ -6,10 +6,10 @@ inputs: description: 'Sonar-scanner version' required: true # https://github.com/SonarSource/sonar-scanner-cli/releases - default: '4.2.0.1873' + default: '4.6.2.2472' branding: icon: 'check' - color: 'black' + color: 'gray-dark' runs: using: 'node12' main: 'dist/index.js'