csa-backend-test/.gitea/workflows/testing.yaml

36 lines
886 B
YAML

name: Backend SonarQube Check testing
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
sonar-check:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set image tag
run: |
echo "IMAGE_TAG=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@v2
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND_TEST }}
with:
args: >
-Dsonar.projectKey=csa-backend-production
-Dsonar.sources=.
- name: SonarQube Quality Gate
uses: sonarsource/sonarqube-quality-gate-action@v1
timeout-minutes: 5
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BACKEND_TEST }}