diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 31f98209279..56addb1ab98 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -19,12 +19,26 @@ jobs: runs-on: ubuntu-latest if: github.event.workflow_run.conclusion == 'success' steps: - - uses: actions/checkout@v4 + - name: Checkout branch or tag + uses: actions/checkout@v4 + if: github.event.workflow_run.event != 'pull_request' with: repository: ${{ github.event.workflow_run.head_repository.full_name }} ref: ${{ github.event.workflow_run.head_branch }} fetch-depth: 0 + - name: Checkout Pull Request merge result + uses: actions/checkout@v4 + if: github.event.workflow_run.event == 'pull_request' + with: + ref: refs/pull/${{ github.event.workflow_run.pull_requests[0].number }}/merge + fetch-depth: 0 + + - name: Git info + run: | + git status + git log -n 5 --oneline + - name: 'Download code coverage' uses: actions/github-script@v7 with: