Skip to content

Commit

Permalink
Only publish test results/coverage if Uninett repo
Browse files Browse the repository at this point in the history
When running this workflow in a fork context we do not have the necessary permissions
  • Loading branch information
johannaengland committed Jun 13, 2024
1 parent d5217a4 commit be326fd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/publish-test-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
publish-test-results:
name: "Publish test and coverage results"
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'skipped'
if: github.event.workflow_run.conclusion != 'skipped' && github.repository_owner == 'Uninett'

steps:
# Checking out the repo is necessary codecov/codecov-action@v4 to work properly
Expand Down Expand Up @@ -42,7 +42,6 @@ jobs:
files: artifacts/**/*-results.xml

- name: "Upload coverage to Codecov"
if: github.repository_owner == 'Uninett'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
Expand Down

0 comments on commit be326fd

Please sign in to comment.