Hi,
I set up self-hosted runners on EKS, and I am using SonarSource/sonarcloud-github-action@master in Github Actions. I face the issue that sonarcloud-github-action cannot find out “Project root configuration” in correct path. After I searched, the root cause is akin to Github Action - Self hosted Runner - Project Setting None
However, I don’t want to change my working folder of the actions-runner to /home/runner/work. Right now my working folder of the actions-runner is /tmp.
Is any way my self-hosted runners can get sonar-project.properties without changing runner working folder?
name: SonarQube
on:
# Trigger analysis when pushing in master or pull requests, and when creating
# a pull request.
push:
branches:
- test/sonarqube-test
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarqube:
runs-on: [self-hosted, eks-runner]
# runs-on: ubuntu-latest
steps:
-
name: checkout current branch
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
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
# timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}