on: workflow_call: inputs: version: required: false type: string default: '' secrets: SONARQUBE_HOST: required: true SONARQUBE_TOKEN: required: true name: SonarQube jobs: sonarqube: name: SonarQube runs-on: ubuntu-latest steps: - name: Checkout source code uses: actions/checkout@master with: fetch-depth: 0 - name: SonarQube Scan uses: sonarsource/sonarqube-scan-action@master env: SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }} SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} with: args: > -Dsonar.projectVersion=${{ inputs.version }}