Skip to content

Commit 029195c

Browse files
authored
Merge branch 'body-file' into main
2 parents acea7ce + 666805d commit 029195c

File tree

8 files changed

+2150
-988
lines changed

8 files changed

+2150
-988
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: peter-evans

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@ updates:
66
interval: "weekly"
77
labels:
88
- "dependencies"
9+
10+
- package-ecosystem: "npm"
11+
directory: "/"
12+
schedule:
13+
interval: "weekly"
14+
allow:
15+
- dependency-name: "@actions/*"

.github/multiline-content.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This is a multi-line test comment read from a file.
2+
- With GitHub **Markdown** :sparkles:
3+
- Created by [create-or-update-comment][1]
4+
5+
[1]: https://github.com/peter-evans/create-or-update-comment

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ on:
1010
paths-ignore:
1111
- 'README.md'
1212
- 'docs/**'
13+
14+
permissions:
15+
issues: write
16+
pull-requests: write
17+
contents: write
18+
1319
jobs:
1420
build:
1521
runs-on: ubuntu-latest
@@ -34,9 +40,9 @@ jobs:
3440
- id: vars
3541
run: |
3642
if [[ "${{ github.event_name }}" == "pull_request" ]]; then \
37-
echo "::set-output name=issue-number::${{ github.event.number }}"; \
43+
echo "issue-number=${{ github.event.number }}" >> $GITHUB_OUTPUT; \
3844
else \
39-
echo "::set-output name=issue-number::1"; \
45+
echo "issue-number=1" >> $GITHUB_OUTPUT; \
4046
fi
4147
4248
test:

.github/workflows/test-command.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
run: |
1313
repository=${{ github.event.client_payload.slash_command.repository }}
1414
if [[ -z "$repository" ]]; then repository=${{ github.repository }}; fi
15-
echo ::set-output name=repository::$repository
15+
echo "repository=$repository" >> $GITHUB_OUTPUT
1616
branch=${{ github.event.client_payload.slash_command.branch }}
1717
if [[ -z "$branch" ]]; then branch="main"; fi
18-
echo ::set-output name=branch::$branch
18+
echo "branch=$branch" >> $GITHUB_OUTPUT
1919
2020
# Checkout the branch to test
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2222
with:
2323
repository: ${{ steps.vars.outputs.repository }}
2424
ref: ${{ steps.vars.outputs.branch }}
@@ -60,9 +60,25 @@ jobs:
6060
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
6161
reactions: hooray
6262

63+
# Test create with body from file
64+
- id: get-comment-body
65+
run: |
66+
body="$(cat .github/multiline-content.md)"
67+
delimiter="$(openssl rand -hex 8)"
68+
echo "body<<$delimiter" >> $GITHUB_OUTPUT
69+
echo "$body" >> $GITHUB_OUTPUT
70+
echo "$delimiter" >> $GITHUB_OUTPUT
71+
72+
- name: Create comment
73+
uses: ./
74+
with:
75+
issue-number: 1
76+
body: ${{ steps.get-comment-body.outputs.body }}
77+
78+
# Test create from template
6379
- name: Render template
6480
id: template
65-
uses: chuhlomin/render-template@v1.4
81+
uses: chuhlomin/render-template@v1.6
6682
with:
6783
template: .github/comment-template.md
6884
vars: |

0 commit comments

Comments
 (0)