Skip to content

Commit

Permalink
chore: upgrade pr-comment-ci (#3020)
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 authored Jul 31, 2024
1 parent 5ffe595 commit 2e93ff6
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/pr-comment-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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');
}
Expand All @@ -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
Expand All @@ -77,7 +87,6 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.PERSONAL_TOKEN }}
- name: gh checkout pr
env:
Expand Down

0 comments on commit 2e93ff6

Please sign in to comment.