Skip to content

Commit

Permalink
Do not run report action on forks to avoid permissions issues
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjward committed Jan 15, 2025
1 parent ad9fe2c commit e608276
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ jobs:
timeout-minutes: 120
- name: Publish Test Report
uses: mikepenz/[email protected]
if: ${{ always() && ( github.ref != 'refs/heads/master') }}
# To avoid permissions issues do not run with forked repos
# (see https://github.com/mikepenz/action-junit-report/issues/23)
if: ${{ always() && (github.ref != 'refs/heads/master') && (github.event.pull_request.head.repo.full_name == github.repository) }}
with:
report_paths: '/__w/firedrake/firedrake/firedrake.xml'
comment: true
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ jobs:

- name: Publish Test Report
uses: mikepenz/[email protected]
if: ${{ always() && ( github.ref != 'refs/heads/master') }}
# To avoid permissions issues do not run with forked repos
# (see https://github.com/mikepenz/action-junit-report/issues/23)
if: ${{ always() && (github.ref != 'refs/heads/master') && (github.event.pull_request.head.repo.full_name == github.repository) }}
with:
report_paths: '/home/firedrake/pip_venv/src/firedrake/firedrake.xml'
comment: true
Expand Down

0 comments on commit e608276

Please sign in to comment.