Skip to content

Commit 1fcda99

Browse files
committed
ci: add test v3 workflow
1 parent 5f728c3 commit 1fcda99

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.github/workflows/test-v3.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Test v3
2+
on: workflow_dispatch
3+
jobs:
4+
testCreateOrUpdateComment:
5+
runs-on: ubuntu-latest
6+
steps:
7+
# Test create
8+
- name: Create comment
9+
uses: peter-evans/create-or-update-comment@v3-dev
10+
id: couc
11+
with:
12+
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
13+
issue-number: 1
14+
body: |
15+
This is a multi-line test comment
16+
- With GitHub **Markdown** :sparkles:
17+
- Created by [create-or-update-comment][1]
18+
19+
[1]: https://github.com/peter-evans/create-or-update-comment
20+
reactions: '+1'
21+
22+
# Test update
23+
- name: Update comment
24+
uses: peter-evans/create-or-update-comment@v3-dev
25+
with:
26+
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
27+
comment-id: ${{ steps.couc.outputs.comment-id }}
28+
body: |
29+
**Edit:** Some additional info
30+
reactions: eyes
31+
reactions-edit-mode: replace
32+
33+
# Test add reactions
34+
- name: Add reactions
35+
uses: peter-evans/create-or-update-comment@v3-dev
36+
with:
37+
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
38+
comment-id: ${{ steps.couc.outputs.comment-id }}
39+
reactions: heart, hooray, laugh
40+
41+
# Test create with body from file
42+
- name: Create comment
43+
uses: peter-evans/create-or-update-comment@v3-dev
44+
with:
45+
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
46+
issue-number: 1
47+
body-file: .github/comment-body.md
48+
49+
# Test create from template
50+
- name: Render template
51+
id: template
52+
uses: chuhlomin/[email protected]
53+
with:
54+
template: .github/comment-template.md
55+
vars: |
56+
foo: this
57+
bar: that
58+
59+
- name: Create comment
60+
uses: peter-evans/create-or-update-comment@v3-dev
61+
with:
62+
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
63+
issue-number: 1
64+
body: ${{ steps.template.outputs.result }}

0 commit comments

Comments
 (0)