Skip to content

Commit 0d2371c

Browse files
committed
Disable codacy for PR from fork
1 parent 79e7d10 commit 0d2371c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ jobs:
106106
run: make test-unit && make test-functional
107107

108108
# Upload to codacy first as codecov action always remove coverage files despite move_coverage_to_trash at false
109+
# And only if it's not a PR from a fork => Can't work as codacy secret is not accessible in that context
109110
- name: Upload coverages to Codacy
110-
if: ${{ env.COVERAGE_TYPE == 'xdebug' }}
111+
if: ${{ github.event.pull_request.head.repo.full_name == 'yoanm/symfony-jsonrpc-http-server' && env.COVERAGE_TYPE == 'xdebug' }}
111112
run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial
112113

113114
# See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server
@@ -172,6 +173,7 @@ jobs:
172173
finalize-codacy-coverage-report:
173174
runs-on: ubuntu-latest
174175
name: Finalize Codacy coverage report
176+
if: ${{ github.event.pull_request.head.repo.full_name == 'yoanm/symfony-jsonrpc-http-server' }}
175177
needs: [ tests ]
176178
steps:
177179
- name: Setup cache

0 commit comments

Comments
 (0)