👷 CI: NoneFlow 添加 reaction 响应提示 (#2677)

This commit is contained in:
Ju4tCode 2024-04-22 15:58:48 +08:00 committed by GitHub
parent 6810af1e1d
commit 5c2c1770a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,39 @@ concurrency:
cancel-in-progress: false cancel-in-progress: false
jobs: jobs:
reaction:
runs-on: ubuntu-latest
name: reaction
if: |
(
github.event_name == 'issue_comment' &&
github.event.action == 'created'
) ||
(
github.event_name == 'issues' &&
github.event.action == 'opened'
)
steps:
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_KEY }}
- name: Reaction on issue
if: github.event_name == 'issues'
run: |
gh api --method POST /repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/reactions -f "content=rocket"
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: Reaction on issue comment
if: github.event_name == 'issue_comment'
run: |
gh api --method POST /repos/${{ github.repository }}/issues/comments/${{ github.event.comment.id }}/reactions -f "content=rocket"
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
plugin_test: plugin_test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: nonebot2 plugin test name: nonebot2 plugin test