Skip to content

Commit

Permalink
🧑‍💻 CI: 修复 NoneFlow reaction 范围 (#2685)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu committed Apr 29, 2024
1 parent 9d14f72 commit 34770e4
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/noneflow.yml
Expand Up @@ -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' &&
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 34770e4

Please sign in to comment.