Skip to content

Commit

Permalink
fix workflow to run scan unless event is pull request AND pull reques…
Browse files Browse the repository at this point in the history
…t is coming from a fork
  • Loading branch information
georgemccabe committed Sep 11, 2024
1 parent f31a64e commit 14cf465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/sonarqube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- name: Check if PR is from a fork
id: check_fork
if: ${{ github.event.pull_request.head.repo.full_name != 'dtcenter/METdataio' }}
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'dtcenter/METdataio' }}
run: echo "SonarQube scan cannot be run from a fork"; exit 1
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 14cf465

Please sign in to comment.