Skip to content

Commit fb68d80

Browse files
committed
Better handle large dyff outputs
1 parent 25e2a1a commit fb68d80

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

.github/workflows/build-test.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ jobs:
148148
run: |
149149
templates_files=$(find /tmp/old /tmp/new -maxdepth 1 -name '*values.yaml' | sed -E 's|/tmp/(old\|new)/||' | sort | uniq)
150150
151+
header="# dyff of changes in rendered templates of CI manifests\n\n"
151152
comment_body=""
152153
while read -r templates_file; do
153154
if [ ! -f "/tmp/old/$templates_file" ]; then
@@ -171,14 +172,10 @@ jobs:
171172
done <<< "$templates_files"
172173
173174
if [ -z "$comment_body" ]; then
174-
echo "changes=no" >> "$GITHUB_OUTPUT"
175175
comment_body="No changes in rendered templates"
176-
else
177-
echo "changes=yes" >> "$GITHUB_OUTPUT"
178176
fi
179177
180-
echo "$comment_body"
181-
{ echo 'body<<EOF'; echo -e "$comment_body"; echo 'EOF'; } >> "$GITHUB_OUTPUT"
178+
echo -e "$header$comment_body" | tee "/tmp/dyff-output"
182179
183180
- name: Find dyff comment
184181
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3
@@ -193,8 +190,5 @@ jobs:
193190
with:
194191
comment-id: ${{ steps.find-dyff-comment.outputs.comment-id }}
195192
issue-number: ${{ github.event.pull_request.number }}
196-
body: |
197-
# dyff of changes in rendered templates of CI manifests
198-
199-
${{ steps.dyff.outputs.body }}
193+
body-path: /tmp/dyff-output
200194
edit-mode: replace
File renamed without changes.

0 commit comments

Comments
 (0)