From f935a0d4bf6ab0a28aee5f87fc3ca6fe5b870a03 Mon Sep 17 00:00:00 2001 From: adu-crypto Date: Fri, 15 Jul 2022 11:10:54 +0800 Subject: [PATCH] only check membership for comment --- .github/workflows/sims.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 3b031aed98..03ba89be7b 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -30,16 +30,17 @@ jobs: username: ${{ github.actor }} organization: crypto-org-chain token: ${{ secrets.GITHUB_TOKEN }} + if: github.event_name == 'issue_comment' - name: Comment PR for authentication failure uses: crypto-org-chain/actions-pull-request-add-comment@master - if: steps.checkMember.outputs.result == 'false' + if: (steps.checkMember.outputs.result == 'false') && (github.event_name == 'issue_comment') with: message: | Sorry only crypto-org-chain member could run simulations by '/runsim'. If you are a crypto-org-chain member, please set your membership visibility to `public` in this [page](https://github.com/orgs/crypto-org-chain/people). GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Fail and exit the job if authentication failed - if: steps.checkMember.outputs.result == 'false' + if: (steps.checkMember.outputs.result == 'false') && (github.event_name == 'issue_comment') run: exit 1 - name: Comment PR for Sim test started uses: allthatjazzleo/actions-pull-request-add-comment@master