Skip to content

Commit 60214cc

Browse files
authored
Merge pull request #424 from nanotaboada/feature/fork-pr-coverage
chore(ci): skip coverage upload for external fork PRs
2 parents b4c1a03 + 66cbd4f commit 60214cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/python-app.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ jobs:
7979
coverage:
8080
needs: test
8181
runs-on: ubuntu-latest
82+
# Only run coverage for PRs from the same repository (not forks)
83+
# This ensures secrets are available for Codecov and Codacy
84+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
8285
strategy:
8386
matrix:
8487
service: [codecov, codacy]
@@ -107,8 +110,8 @@ jobs:
107110

108111
container:
109112
needs: coverage
110-
runs-on: ubuntu-latest
111113
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
114+
runs-on: ubuntu-latest
112115

113116
permissions:
114117
contents: read

0 commit comments

Comments
 (0)