Skip to content

Commit

Permalink
IGNITE-22775 add checkout to read custom action (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
skorotkov authored Jul 21, 2024
1 parent f3db0de commit 6496ba4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/actions/sonar-fork/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ runs:
retention-days: 1

### EXECUTE ANALYSIS ###
- name: 'Checkout project'
if: github.event_name == 'workflow_run'
uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of Sonar analysis
# - name: 'Checkout project'
# if: github.event_name == 'workflow_run'
# uses: actions/checkout@v4
# with:
# repository: ${{ github.event.workflow_run.head_repository.full_name }}
# ref: ${{ github.event.workflow_run.head_branch }}
# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of Sonar analysis

# - name: 'Infer build type'
# if: github.event_name == 'workflow_run'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/sonar-pr-from-fork-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ jobs:
permissions:
actions: read
steps:
- name: 'Checkout project'
if: github.event_name == 'workflow_run'
uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of Sonar analysis

- name: 'Sonar analysis'
uses: ./.github/actions/sonar-fork
with:
Expand Down

0 comments on commit 6496ba4

Please sign in to comment.