From 003de474cf6f7be51d93441acfaab32f81b058fd Mon Sep 17 00:00:00 2001 From: Rick van der Meij Date: Fri, 10 Nov 2023 15:00:23 +0100 Subject: [PATCH] create github action --- .github/workflows/build.yml | 20 ++++++++++++++++++++ sonar-project.properties | 5 +++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4b43a8b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,20 @@ +name: Build +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/sonar-project.properties b/sonar-project.properties index c72b026..114b4cc 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,8 +1,9 @@ # must be unique in a given SonarQube instance -sonar.projectKey=RVDM-Angular-Starterkit -sonar.projectName=RVDM-Angular-Starterkit +sonar.projectKey=rickvandermey_angular-starterkit +sonar.projectName=rickvandermey_angular-starterkit sonar.organization=rickvandermey + sonar.pullrequest.github.repository=rickvandermey/angular-starterkit sonar.links.homepage=https://github.com/rickvandermey/angular-starterkit sonar.links.ci=https://travis-ci.org/rickvandermey/angular-starterkit