Skip to content

feat: Added sonar workflow #1

feat: Added sonar workflow

feat: Added sonar workflow #1

Workflow file for this run

name: Sonar
on:
workflow_call:
secrets:
PERSONAL_ACCESS_TOKEN:
required: true
SONAR_HOST_URL:
required: true
SONAR_TOKEN:
required: true
jobs:
sonar-analysis:
name: 'Sonar Analysis'
runs-on: self-hosted
secrets:
SONAR_HOST_URL:

Check failure on line 17 in .github/workflows/sonar.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/sonar.yaml

Invalid workflow file

invalid value for secrets. Expected "inherit" keyword or explicit map of secrets
required: true
SONAR_TOKEN:
required: true
steps:
- name: "Check Required Secrets"
run: |
if [[ -z "${{ secrets.SONAR_HOST_URL }}" || -z "${{ secrets.SONAR_TOKEN }}" ]]; then
echo "❌ Required secrets are missing!"
exit 1
fi
- name: 'Check out the repository'
uses: actions/checkout@v4
- name: 'Sonar Processing'
run: |
docker run --rm -v "${{ github.workspace }}:/usr/src" \
-e SONAR_HOST_URL=${{ secrets.SONAR_HOST_URL }} \
-e SONAR_TOKEN=${{ secrets.SONAR_TOKEN }} \
sonarsource/sonar-scanner-cli