diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 9ed8f961..f3a4fd3f 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -192,13 +192,16 @@ jobs: - name: Coverage comment id: coverage_comment + if: github.event_name == 'pull_request' uses: py-cov-action/python-coverage-comment-action@v3 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Store Pull Request comment to be posted uses: actions/upload-artifact@v4 - if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' + if: | + github.event_name == 'pull_request' + && steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' with: name: python-coverage-comment-action path: python-coverage-comment-action.txt