diff --git a/.github/workflows/build-sonar-report.yml b/.github/workflows/build-sonar-report.yml index bc99eaa82b2..398e8227c83 100644 --- a/.github/workflows/build-sonar-report.yml +++ b/.github/workflows/build-sonar-report.yml @@ -30,6 +30,11 @@ jobs: steps: # Pinned 1.0.0 version - uses: marocchino/action-workflow_run-status@54b6e87d6cb552fc5f36dbe9a722a6048725917a + + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.workflow_run.head_sha }} + - name: Cache SonarCloud packages uses: actions/cache@v3 with: @@ -44,6 +49,12 @@ jobs: run-id: ${{ github.event.workflow_run.id }} path: artifacts/ + - name: Copy coverage report + run: | + mkdir -p cdap-coverage/target/ + cp -r artifacts/reports-${{ github.event.workflow_run.id }}/cdap-coverage/target/ cdap-coverage/target/ + ls -R cdap-coverage + - name: Sonar Report on PR # For whatever reason we get PR 69 for develop branch with both head and base as develop. if: ${{ github.event.workflow_run.pull_requests[0].head.ref != github.event.workflow_run.pull_requests[0].base.ref }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3fbbaf0b0e..b92bf21a429 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,6 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ github.event.workflow_run.head_sha }} submodules: recursive - name: Cache uses: actions/cache@v4