mirror of
https://github.com/peter-evans/create-or-update-comment.git
synced 2025-01-19 03:26:42 +08:00
Add workflows
This commit is contained in:
parent
03a4ec0930
commit
c244258bca
29
.github/workflows/create-comment.yml
vendored
Normal file
29
.github/workflows/create-comment.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: Create Comment
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
createComment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
# For debugging purposes. Remove this in production.
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
|
||||
- name: Create comment
|
||||
uses: ./
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-number: 1
|
||||
body: |
|
||||
This is a multi-line test comment
|
||||
- With GitHub **Markdown**
|
||||
- Created by [create-or-update-comment][1]
|
||||
|
||||
[1]: https://github.com/peter-evans/create-or-update-comment
|
||||
reaction-type: +1
|
31
.github/workflows/update-comment.yml
vendored
Normal file
31
.github/workflows/update-comment.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
name: Update Comment
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
jobs:
|
||||
updateComment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
# For debugging purposes. Remove this in production.
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
|
||||
- name: Update comment
|
||||
uses: ./
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
comment-id: ${{ github.event.comment.id }}
|
||||
body: |
|
||||
**Edit:** Some additional info
|
||||
reaction-type: eyes
|
||||
|
||||
- name: Add reaction
|
||||
uses: ./
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
comment-id: ${{ github.event.comment.id }}
|
||||
reaction-type: heart
|
Loading…
x
Reference in New Issue
Block a user