From fec5c39dcc73796ff02ce653d92aab16ee438083 Mon Sep 17 00:00:00 2001 From: Eddy Filip Date: Thu, 20 Feb 2025 13:27:55 +0100 Subject: [PATCH] Add condition to run tests only on maintainer's branches --- .github/workflows/test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5cad052..3e00d36 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,12 @@ jobs: - run: npm ci - run: npm test test-with-output-secrets: + if: | + github.ref == 'refs/heads/main' || + ( + github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository + ) uses: ./.github/workflows/acceptance-test.yml secrets: inherit with: @@ -23,6 +29,12 @@ jobs: multiline-secret: op://acceptance-tests/multiline-secret/notesPlain export-env: false test-with-export-env: + if: | + github.ref == 'refs/heads/main' || + ( + github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository + ) uses: ./.github/workflows/acceptance-test.yml secrets: inherit with: @@ -31,6 +43,12 @@ jobs: multiline-secret: op://acceptance-tests/multiline-secret/notesPlain export-env: true test-references-with-ids: + if: | + github.ref == 'refs/heads/main' || + ( + github.event_name == 'pull_request' && + github.event.pull_request.head.repo.full_name == github.repository + ) uses: ./.github/workflows/acceptance-test.yml secrets: inherit with: