From 2e93ff6868f951d0c875efac86980c1f7ecbf3ea Mon Sep 17 00:00:00 2001 From: liweijie0812 <674416404@qq.com> Date: Wed, 31 Jul 2024 15:17:49 +0800 Subject: [PATCH] chore: upgrade pr-comment-ci (#3020) --- .github/workflows/pr-comment-ci.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-comment-ci.yml b/.github/workflows/pr-comment-ci.yml index cf82c5678..0029b460c 100644 --- a/.github/workflows/pr-comment-ci.yml +++ b/.github/workflows/pr-comment-ci.yml @@ -13,7 +13,9 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 1 + sparse-checkout: | + .github/CODEOWNERS + sparse-checkout-cone-mode: false - uses: actions/github-script@v7 id: get-action with: @@ -41,7 +43,15 @@ jobs: } if (body.startsWith('/update-snapshot')) { next_action='update-snapshot' - } + } + if(next_action){ + await github.rest.reactions.createForIssueComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: context.payload.comment.id, + content: 'rocket', + }) + } } else { core.warning('You are not collaborator'); } @@ -55,18 +65,18 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: main token: ${{ secrets.PERSONAL_TOKEN }} - name: gh checkout pr env: GH_TOKEN: ${{ secrets.PERSONAL_TOKEN }} run: gh pr checkout ${{ github.event.issue.number }} --recurse-submodules + - run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" - run: git submodule update --remote --merge - name: Commit Common run: | git add . - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" git commit -m "chore: update common" git push @@ -77,7 +87,6 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: main token: ${{ secrets.PERSONAL_TOKEN }} - name: gh checkout pr env: