Skip to content

Commit 0dab332

Browse files
author
Dimitri POSTOLOV
authored
using simple approach for set output (#40)
1 parent 0f28e9e commit 0dab332

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

template.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,14 @@ jobs:
9595
if: success() && github.event.number
9696
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
9797

98-
- name: Get comment body
98+
- name: Get Comment Body
9999
id: get-comment-body
100100
if: success() && github.event.number
101-
uses: actions/github-script@v6
102-
with:
103-
result-encoding: string
104-
script: |
105-
const fs = require('fs')
106-
const comment = fs.readFileSync('.next/analyze/__bundle_analysis_comment.txt', 'utf8')
107-
core.setOutput('body', comment)
101+
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
102+
run: |
103+
echo "body<<EOF" >> $GITHUB_OUTPUT
104+
echo "$(cat .next/analyze/__bundle_analysis_comment.txt)" >> $GITHUB_OUTPUT
105+
echo EOF >> $GITHUB_OUTPUT
108106
109107
- name: Find Comment
110108
uses: peter-evans/find-comment@v2

0 commit comments

Comments
 (0)