GitHub Actions Self-hosted runner Sonar properties file missing

Hey everyone

I have same issue as in this topic
Following user solution I have pointed the same working directory: /home/runner/work, but expected location of properties file folder did not change.
Here is my code:

jobs:
  sonarqube:
    name: SonarQube Trigger
    runs-on: self-hosted
    defaults:
      run:
        working-directory: /home/runner/work
    steps:
    - name: Checking out
      uses: actions/checkout@v2
      with:
        # Disabling shallow clone is recommended for improving relevancy of reporting
        fetch-depth: 0
    - name: SonarQube Scan
      uses: sonarsource/sonarqube-scan-action@master
      with:
        projectBaseDir: ./
      env:
        SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
        SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}

and this is how the output look like:

Run sonarsource/sonarqube-scan-action@master
  with:
    projectBaseDir: ./
  env:
    SONAR_TOKEN: ***
    SONAR_HOST_URL: ***
/usr/bin/docker run --name d2cbeaa37824c72926cb20f117c5fd0_f2709c --label 189340 --workdir /github/workspace --rm -e "SONAR_TOKEN" -e "SONAR_HOST_URL" -e "INPUT_PROJECTBASEDIR" -e "INPUT_ARGS" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true --entrypoint "/entrypoint.sh" -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/datadrive/Home/Sandbox/actions-runner/_work/_temp/_github_home":"/github/home" -v "/datadrive/Home/Sandbox/actions-runner/_work/_temp/_github_workflow":"/github/workflow" -v "/datadrive/Home/Sandbox/actions-runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/datadrive/Home/Sandbox/actions-runner/_work/Bartek-sandbox/Bartek-sandbox":"/github/workspace" 189340:3d2cbeaa37824c72926cb20f117c5fd0
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE

I hope someone has an idea how to fix it.
Best

Hi,

I’m really not following what the problem is. Can you please give a fuller explanation and also provide your analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann

Hey Ann

Solution turned out to be very simple. I had to move properties file from root to folder where my source code is stored. This solved my case

1 Like