From e1802d7c2703244f72d3dce4827e28f1ad5f58db Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Wed, 26 Feb 2025 12:57:17 -0800 Subject: [PATCH] feat: we can't use pr scanning on the free tier... Can't believe we have to pay for that even on a self-hosted instance. --- .gitea/workflows/sonar-main.yml | 24 ------------------------ .gitea/workflows/sonar-pr.yml | 10 +++++----- 2 files changed, 5 insertions(+), 29 deletions(-) delete mode 100644 .gitea/workflows/sonar-main.yml diff --git a/.gitea/workflows/sonar-main.yml b/.gitea/workflows/sonar-main.yml deleted file mode 100644 index 33278b3..0000000 --- a/.gitea/workflows/sonar-main.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Code Analysis -on: - push: - branches: - - main - -jobs: - sonar: - name: SonarQube - - steps: - - name: Checkout Source Files - uses: actions/checkout@v4 - - - name: Sonar - uses: SonarSource/sonarqube-scan-action@v4 - timeout-minutes: 10 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: "https://quality.nhcarrigan.com" - with: - args: > - -Dsonar.sources=. - -Dsonar.projectKey=typescript-config diff --git a/.gitea/workflows/sonar-pr.yml b/.gitea/workflows/sonar-pr.yml index 235dc6a..31fd31c 100644 --- a/.gitea/workflows/sonar-pr.yml +++ b/.gitea/workflows/sonar-pr.yml @@ -1,5 +1,8 @@ name: Code Analysis on: + push: + branches: + - main pull_request: branches: - main @@ -11,6 +14,8 @@ jobs: steps: - name: Checkout Source Files uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Sonar uses: SonarSource/sonarqube-scan-action@v4 @@ -18,12 +23,7 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: "https://quality.nhcarrigan.com" - PR_KEY: ${{ github.event.pull_request.number }} - PR_BRANCH: ${{ github.event.pull_request.head.ref }} with: args: > -Dsonar.sources=. -Dsonar.projectKey=typescript-config - -Dsonar.pullrequest.key=$PR_KEY - -Dsonar.pullrequest.branch=$PR_BRANCH - -Dsonar.pullrequest.base=main