Skip to content

Commit

Permalink
Merge pull request #803 from I2PC/ms_updated_sonarscan
Browse files Browse the repository at this point in the history
Updated Sonar Scanner version
  • Loading branch information
albertmena authored Aug 29, 2023
2 parents 546f559 + 59dbd23 commit 4861785
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/scanBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,26 @@ name: SonarCloud scan

# Specify when the Action should be triggered: when a pull request is opened against the 'devel' or 'master' branch
on:
push:
branches: [devel, master]
pull_request:
branches: [devel, master]
jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
# Prepare the enviroment for Sonar scanner
- name: Prepare Sonar scanner
run: |
wget -nv https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.0.2311-linux.zip
unzip -q sonar-scanner-cli-4.6.0.2311-linux.zip
echo "${PWD}/sonar-scanner-4.6.0.2311-linux/bin/" >> $GITHUB_PATH
working-directory: ${{ env.BUILD_DIR }}
- name: SonarCloud Scan
run: |
sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=i2pc -Dsonar.login=$SONAR_TOKEN -Dsonar.projectKey=Xmipp
wget -nv -O sonar-scanner-cli.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ vars.SONAR_VERSION }}-linux.zip
unzip -q sonar-scanner-cli.zip -d sonar-scanner-cli
mv sonar-scanner-cli/*/* sonar-scanner-cli/
echo "${PWD}/sonar-scanner-cli/bin/" >> $GITHUB_PATH
# Run the SonarCloud Scan
- name: SonarCloud Scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=i2pc -Dsonar.login=$SONAR_TOKEN -Dsonar.projectKey=XmippCore

0 comments on commit 4861785

Please sign in to comment.