From 34770e446360d0c63c06695cbf5c707cdaedc090 Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Mon, 29 Apr 2024 20:26:35 +0800 Subject: [PATCH] =?UTF-8?q?:technologist:=20CI:=20=E4=BF=AE=E5=A4=8D=20Non?= =?UTF-8?q?eFlow=20reaction=20=E8=8C=83=E5=9B=B4=20(#2685)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/noneflow.yml | 42 ++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/noneflow.yml b/.github/workflows/noneflow.yml index ec114d30..c6932d06 100644 --- a/.github/workflows/noneflow.yml +++ b/.github/workflows/noneflow.yml @@ -15,9 +15,33 @@ concurrency: cancel-in-progress: false jobs: + check: + runs-on: ubuntu-latest + name: check + # do not run on forked PRs, do not run on not related issues, do not run on pr comments + if: | + !( + ( + github.event.pull_request && + ( + github.event.pull_request.head.repo.fork || + !( + contains(github.event.pull_request.labels.*.name, 'Plugin') || + contains(github.event.pull_request.labels.*.name, 'Adapter') || + contains(github.event.pull_request.labels.*.name, 'Bot') + ) + ) + ) || + ( + github.event_name == 'issue_comment' && github.event.issue.pull_request + ) + ) + steps: + - run: echo "Check passed" reaction: runs-on: ubuntu-latest name: reaction + needs: check if: | ( github.event_name == 'issue_comment' && @@ -51,23 +75,7 @@ jobs: plugin_test: runs-on: ubuntu-latest name: nonebot2 plugin test - if: | - !( - ( - github.event.pull_request && - ( - github.event.pull_request.head.repo.fork || - !( - contains(github.event.pull_request.labels.*.name, 'Plugin') || - contains(github.event.pull_request.labels.*.name, 'Adapter') || - contains(github.event.pull_request.labels.*.name, 'Bot') - ) - ) - ) || - ( - github.event_name == 'issue_comment' && github.event.issue.pull_request - ) - ) + needs: check permissions: issues: read outputs: