diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a3cf68e3..7914a938 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,6 +39,14 @@ jobs: os: [self-hosted] python-version: [3.8] steps: + - name: Check if PR is from owner's repository + id: check-owner + run: | + if [[ "${{ github.actor }}" == "owner_username" ]]; then + echo "::set-output name=is_owner::true" + else + echo "::set-output name=is_owner::false" + fi - uses: actions/checkout@v3 - name: Set up Python for Self-Hosted Linux arm64 uses: iory/action@v3.1.2 @@ -58,7 +66,12 @@ jobs: coverage erase coverage run -m pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered tests coverage xml + - name: Step for Owner's PR Only + if: steps.check-owner.outputs.is_owner == 'true' + run: | + echo "This step runs only for PRs from the owner's PR" - name: Pytest coverage comment + if: steps.check-owner.outputs.is_owner == 'true' uses: MishaKav/pytest-coverage-comment@main with: pytest-xml-coverage-path: ./coverage.xml