From 9902b2d9f1b92c3684d8ecc24da3b899dd702498 Mon Sep 17 00:00:00 2001 From: Asmir Avdicevic Date: Tue, 15 Oct 2024 23:06:14 +0200 Subject: [PATCH] fix(ci): netsim does not interact with PR comments on forks (#2777) ## Description Seems like permissions are still messy and the netsim job fails on forks whenever it interacts with a PR from a fork, even though it's on our own repo and we allow it to run. This simply drops any type of commenting on the PR from a fork. Need to add back the required check for this job once it's merged. ## Breaking Changes ## Notes & open questions ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented. --- .github/workflows/netsim_runner.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/netsim_runner.yaml b/.github/workflows/netsim_runner.yaml index 8be9f1f812..a506df2826 100644 --- a/.github/workflows/netsim_runner.yaml +++ b/.github/workflows/netsim_runner.yaml @@ -201,7 +201,7 @@ jobs: body-includes: Netsim report & logs for this PR have been generated - name: Create or Update Docs Comment - if: ${{ inputs.pr_number != '' }} + if: ${{ inputs.pr_number != '' && !github.event.pull_request.head.repo.fork }} uses: peter-evans/create-or-update-comment@v4 with: issue-number: ${{ inputs.pr_number }} @@ -225,7 +225,7 @@ jobs: - name: Echo Report Table on PR uses: peter-evans/create-or-update-comment@v4 - if: ${{ inputs.pr_number != '' && inputs.report_table }} + if: ${{ inputs.pr_number != '' && inputs.report_table && !github.event.pull_request.head.repo.fork }} with: issue-number: ${{ inputs.pr_number }} body: | @@ -234,7 +234,7 @@ jobs: ${{ steps.generate_report_table.outputs.NETSIM_REPORT }} - name: Publish metrics - if: ${{ inputs.publish_metrics }} + if: ${{ inputs.publish_metrics && !github.event.pull_request.head.repo.fork }} run: | cd ../chuck/netsim d=$(cat report_metro.txt)