Skip to content

Commit f10a9ad

Browse files
committed
feat: testing posting comments on PR feature
1 parent a0f67c0 commit f10a9ad

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,18 @@ jobs:
5353
id: checkout
5454
uses: actions/checkout@v4
5555

56-
- name: Test Local Action
56+
- name: Test Local Action And Capture Output
5757
id: test-action
5858
uses: ./
5959
with:
6060
milliseconds: 2000
61-
script: |
62-
github.rest.issues.createComment({
63-
issue_number: context.issue.number,
64-
owner: context.repo.owner,
65-
repo: context.repo.repo,
66-
body: 'This is a sample comment posting from jaychang99's github action!'
67-
})
61+
62+
- name: Post comment on PR
63+
uses: peter-evans/create-or-update-comment@v1
64+
with:
65+
issue-number: ${{ github.event.pull_request.number }}
66+
body:
67+
'The test took ${{ steps.test-action.outputs.time }} milliseconds.'
6868

6969
- name: Print Output
7070
id: output

0 commit comments

Comments
 (0)