Skip to content

Commit

Permalink
chore(ci): add comment PR workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Sec-ant committed Dec 26, 2023
1 parent 2dc188a commit 4aadbad
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Commment PR

on:
repository_dispatch:
types: [build-start, build-finish]

permissions:
pull-requests: write
contents: write

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Comment build start message
if: ${{ github.event.action == 'build-start' }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Now I'm building the package for testing. Please be patient.
pr_number: ${{github.event.client_payload.pr-number}}
comment_tag: ci-bot
- name: Comment build finish message
if: ${{ github.event.action == 'build-finish' }}
uses: thollander/actions-comment-pull-request@v2
with:
message: |
CI build finished. Use the link below to test the packge:
```
${{github.event.client_payload.release-url}}
```
For example, in `npm`:
```bash
npm i ${{github.event.client_payload.release-url}}
```
pr_number: ${{github.event.client_payload.pr-number}}
comment_tag: ci-bot

0 comments on commit 4aadbad

Please sign in to comment.