From 6cc6cf813931799604182a71778c9b3a6df7adae Mon Sep 17 00:00:00 2001 From: Splines Date: Wed, 15 May 2024 02:36:29 +0200 Subject: [PATCH] Only run unit tests after explicit approval --- .github/workflows/tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index db47d5027..7f1b98792 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,8 +6,8 @@ on: - main - dev - experimental - pull_request: - types: [opened, reopened, synchronize, ready_for_review] + issue_comment: + types: [created] jobs: # For the setup idea using Docker Buildx, see StackOverflow answer [1]. @@ -23,6 +23,7 @@ jobs: environment: testing runs-on: ubuntu-latest permissions: write-all + if: ${{ github.event.issue.pull_request }} && ${{ github.event.issue.body }} == "run tests" && ${{ github.event.issue.author_association }} == "COLLABORATOR" steps: - name: Checkout code uses: actions/checkout@v4