Skip to content

Update test

Update test #6

Workflow file for this run

name: Check quality gate result on pull request
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- name: Wait for the quality gate result
run: sleep 5
- uses: phwt/sonarqube-quality-gate-action@v1
id: quality-gate-check
with:
sonar-project-key: ${{ secrets.SONAR_PROJECT_KEY }}
sonar-host-url: ${{ secrets.SONAR_HOST_URL }}
sonar-token: ${{ secrets.SONAR_TOKEN }}
github-token: ${{ secrets.SONAR_GITHUB_TOKEN }}
branch: main # Optional input
- name: Output result
run: |
echo "${{ steps.quality-gate-check.outputs.project-status }}"
echo "${{ steps.quality-gate-check.outputs.quality-gate-result }}"