@@ -15,91 +15,9 @@ concurrency:
15
15
cancel-in-progress : false
16
16
17
17
jobs :
18
- check :
19
- runs-on : ubuntu-latest
20
- name : check
21
- # do not run on forked PRs, do not run on not related issues, do not run on pr comments
22
- if : |
23
- !(
24
- (
25
- github.event.pull_request &&
26
- (
27
- github.event.pull_request.head.repo.fork ||
28
- !(
29
- contains(github.event.pull_request.labels.*.name, 'Plugin') ||
30
- contains(github.event.pull_request.labels.*.name, 'Adapter') ||
31
- contains(github.event.pull_request.labels.*.name, 'Bot')
32
- )
33
- )
34
- ) ||
35
- (
36
- github.event_name == 'issue_comment' && github.event.issue.pull_request
37
- )
38
- )
39
- steps :
40
- - run : echo "Check passed"
41
- reaction :
42
- runs-on : ubuntu-latest
43
- name : reaction
44
- needs : check
45
- if : |
46
- (
47
- github.event_name == 'issue_comment' &&
48
- github.event.action == 'created'
49
- ) ||
50
- (
51
- github.event_name == 'issues' &&
52
- github.event.action == 'opened'
53
- )
54
- steps :
55
- - name : Generate token
56
- id : generate-token
57
- uses : tibdex/github-app-token@v2
58
- with :
59
- app_id : ${{ secrets.APP_ID }}
60
- private_key : ${{ secrets.APP_KEY }}
61
-
62
- - name : Reaction on issue
63
- if : github.event_name == 'issues'
64
- run : |
65
- gh api --method POST /repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/reactions -f "content=rocket"
66
- env :
67
- GH_TOKEN : ${{ steps.generate-token.outputs.token }}
68
-
69
- - name : Reaction on issue comment
70
- if : github.event_name == 'issue_comment'
71
- run : |
72
- gh api --method POST /repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions -f "content=rocket"
73
- env :
74
- GH_TOKEN : ${{ steps.generate-token.outputs.token }}
75
- plugin_test :
76
- runs-on : ubuntu-latest
77
- name : nonebot2 plugin test
78
- needs : check
79
- permissions :
80
- issues : read
81
- outputs :
82
- result : ${{ steps.plugin-test.outputs.RESULT }}
83
- output : ${{ steps.plugin-test.outputs.OUTPUT }}
84
- metadata : ${{ steps.plugin-test.outputs.METADATA }}
85
- steps :
86
- - name : Install Poetry
87
- if : ${{ !startsWith(github.event_name, 'pull_request') }}
88
- run : pipx install poetry
89
-
90
- - name : Setup Python
91
- uses : actions/setup-python@v5
92
- with :
93
- python-version : " 3.x"
94
-
95
- - name : Test Plugin
96
- id : plugin-test
97
- run : |
98
- curl -sSL https://github.com/nonebot/noneflow/releases/latest/download/plugin_test.py | python -
99
18
noneflow :
100
19
runs-on : ubuntu-latest
101
20
name : noneflow
102
- needs : plugin_test
103
21
steps :
104
22
- name : Generate token
105
23
id : generate-token
@@ -127,12 +45,10 @@ jobs:
127
45
"base": "master",
128
46
"plugin_path": "assets/plugins.json",
129
47
"bot_path": "assets/bots.json",
130
- "adapter_path": "assets/adapters.json"
48
+ "adapter_path": "assets/adapters.json",
49
+ "registry_repository": "nonebot/registry"
131
50
}
132
51
env :
133
- PLUGIN_TEST_RESULT : ${{ needs.plugin_test.outputs.result }}
134
- PLUGIN_TEST_OUTPUT : ${{ needs.plugin_test.outputs.output }}
135
- PLUGIN_TEST_METADATA : ${{ needs.plugin_test.outputs.metadata }}
136
52
APP_ID : ${{ secrets.APP_ID }}
137
53
PRIVATE_KEY : ${{ secrets.APP_KEY }}
138
54
PRE_COMMIT_HOME : /github/workspace/.cache/.pre-commit
0 commit comments