From be326fd4ace02d500e4beb65b9c2eec1950ed2e0 Mon Sep 17 00:00:00 2001 From: Johanna England Date: Thu, 13 Jun 2024 13:38:23 +0200 Subject: [PATCH] Only publish test results/coverage if Uninett repo When running this workflow in a fork context we do not have the necessary permissions --- .github/workflows/publish-test-results.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish-test-results.yml b/.github/workflows/publish-test-results.yml index ec1cad8..7464fee 100644 --- a/.github/workflows/publish-test-results.yml +++ b/.github/workflows/publish-test-results.yml @@ -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 @@ -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