From 405233a8a7567e90baca93e48f2dc48d31397ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20T=C3=BCrken?= Date: Thu, 27 Feb 2025 17:00:06 +0300 Subject: [PATCH] Prevent member from triggering workflow via PR comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fatih Türken --- .github/workflows/uptest-trigger.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/uptest-trigger.yml b/.github/workflows/uptest-trigger.yml index 4b7bab2a5..657f85cc0 100644 --- a/.github/workflows/uptest-trigger.yml +++ b/.github/workflows/uptest-trigger.yml @@ -22,7 +22,7 @@ jobs: echo "github.event.comment.author_association: ${{ github.event.comment.author_association }}" get-example-list: - if: ${{ (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' ) && + if: ${{ (github.event.comment.author_association == 'OWNER' ) && github.event.issue.pull_request && contains(github.event.comment.body, '/test-examples' ) }} runs-on: ubuntu-latest @@ -79,7 +79,7 @@ jobs: -f context="Uptest-${{ steps.get-example-list-name.outputs.example-hash }}" uptest: - if: ${{ (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' ) && + if: ${{ (github.event.comment.author_association == 'OWNER' ) && github.event.issue.pull_request && contains(github.event.comment.body, '/test-examples' ) }} runs-on: ubuntu-latest