From 5c2c1770a2760bc8574782afa91a3a078fc852d9 Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Mon, 22 Apr 2024 15:58:48 +0800 Subject: [PATCH] =?UTF-8?q?:construction=5Fworker:=20CI:=20NoneFlow=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20reaction=20=E5=93=8D=E5=BA=94=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=20(#2677)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/noneflow.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/noneflow.yml b/.github/workflows/noneflow.yml index f73bb5dd..ec114d30 100644 --- a/.github/workflows/noneflow.yml +++ b/.github/workflows/noneflow.yml @@ -15,6 +15,39 @@ concurrency: cancel-in-progress: false 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: runs-on: ubuntu-latest name: nonebot2 plugin test