create-or-update-comment/.github/workflows/test-v3.yml
dependabot[bot] e3645dd16d
build(deps): bump chuhlomin/render-template from 1.7 to 1.8 (#263)
Bumps [chuhlomin/render-template](https://github.com/chuhlomin/render-template) from 1.7 to 1.8.
- [Release notes](https://github.com/chuhlomin/render-template/releases)
- [Commits](https://github.com/chuhlomin/render-template/compare/v1.7...v1.8)

---
updated-dependencies:
- dependency-name: chuhlomin/render-template
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 05:39:38 +00:00

67 lines
1.9 KiB
YAML

name: Test v3
on: workflow_dispatch
jobs:
testCreateOrUpdateComment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Test create
- name: Create comment
uses: peter-evans/create-or-update-comment@v3
id: couc
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
issue-number: 1
body: |
This is a multi-line test comment
- With GitHub **Markdown** :sparkles:
- Created by [create-or-update-comment][1]
[1]: https://github.com/peter-evans/create-or-update-comment
reactions: '+1'
# Test update
- name: Update comment
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
comment-id: ${{ steps.couc.outputs.comment-id }}
body: |
**Edit:** Some additional info
reactions: eyes
reactions-edit-mode: replace
# Test add reactions
- name: Add reactions
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
comment-id: ${{ steps.couc.outputs.comment-id }}
reactions: heart, hooray, laugh
# Test create with body from file
- name: Create comment
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
issue-number: 1
body-file: .github/comment-body.md
# Test create from template
- name: Render template
id: template
uses: chuhlomin/render-template@v1.8
with:
template: .github/comment-template.md
vars: |
foo: this
bar: that
- name: Create comment
uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
issue-number: 1
body: ${{ steps.template.outputs.result }}