Skip to content

Commit

Permalink
IGNITE-20466 Checkout PR base master
Browse files Browse the repository at this point in the history
  • Loading branch information
skorotkov committed Jul 25, 2024
1 parent c97b387 commit a694618
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/sonar-pr-from-fork-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,20 @@ jobs:
return check_response.data.id;
result-encoding: string

- uses: actions/checkout@v4
- name: Checkout PR head branch
uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}
fetch-depth: 0
persist-credentials: false

- name: Checkout PR base branch
run: |
git remote add upstream ${{ github.event.repository.clone_url }}
git fetch upstream
git checkout -B $pr_base_ref upstream/$pr_base_ref
git checkout ${{ github.event.workflow_run.head_branch }}
git clean -ffdx && git reset --hard HEAD
- name: Download compiled classes artifact
uses: actions/download-artifact@v4
Expand Down

0 comments on commit a694618

Please sign in to comment.