Skip to content

Commit d6d8b06

Browse files
authored
IGNITE-23820 Restore 'checkout' in sonar-pr-from-fork-build.yml (#11721)
1 parent 510fa7b commit d6d8b06

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/sonar-pr-from-fork-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
name: Build artifacts for Sonar Analysis
3333
runs-on: ubuntu-latest
3434
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
persist-credentials: false
38+
3539
- name: Set up JDK11
3640
uses: actions/setup-java@v4
3741
with:

.github/workflows/sonar-pr-from-fork-scan.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ jobs:
9090
# "fetch-depth: 0" is needed for Sonar's new code detection, blame information and issue backdating
9191
# see more details at https://community.sonarsource.com/t/git-fetch-depth-implications/75260
9292

93+
- name: Checkout PR base branch
94+
run: |
95+
git remote add upstream https://github.com/apache/ignite
96+
git fetch upstream
97+
git checkout -B $pr_base_ref upstream/$pr_base_ref
98+
git checkout ${{ github.event.workflow_run.head_sha }}
99+
git clean -ffdx && git reset --hard HEAD
100+
93101
- name: Download compiled classes artifact
94102
uses: actions/download-artifact@v4
95103
with:

0 commit comments

Comments
 (0)