Skip to content

Commit d258f2b

Browse files
committed
improve: run sonar for forked repo PRs
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent 1a07a04 commit d258f2b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/sonar.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- 'docs/**'
1313
- 'adr/**'
1414
branches: [ main ]
15-
pull_request:
15+
pull_request_target:
1616
paths-ignore:
1717
- 'docs/**'
1818
- 'adr/**'
@@ -21,9 +21,12 @@ on:
2121
jobs:
2222
test:
2323
runs-on: ubuntu-latest
24-
if: ${{ github.actor != 'dependabot[bot]' && (( github.event_name == 'push' ) || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login == 'operator-framework' )) }}
24+
if: ${{ github.actor != 'dependabot[bot]' }}
2525
steps:
2626
- uses: actions/checkout@v6
27+
with:
28+
ref: ${{ github.event.pull_request.head.sha }}
29+
fetch-depth: 0
2730
- name: Set up Java and Maven
2831
uses: actions/setup-java@v5
2932
with:

0 commit comments

Comments
 (0)