@@ -148,6 +148,7 @@ jobs:
148
148
run : |
149
149
templates_files=$(find /tmp/old /tmp/new -maxdepth 1 -name '*values.yaml' | sed -E 's|/tmp/(old\|new)/||' | sort | uniq)
150
150
151
+ header="# dyff of changes in rendered templates of CI manifests\n\n"
151
152
comment_body=""
152
153
while read -r templates_file; do
153
154
if [ ! -f "/tmp/old/$templates_file" ]; then
@@ -171,16 +172,13 @@ jobs:
171
172
done <<< "$templates_files"
172
173
173
174
if [ -z "$comment_body" ]; then
174
- echo "changes=no" >> "$GITHUB_OUTPUT"
175
175
comment_body="No changes in rendered templates"
176
- else
177
- echo "changes=yes" >> "$GITHUB_OUTPUT"
178
176
fi
179
177
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"
182
179
183
180
- name : Find dyff comment
181
+ if : github.event.pull_request.number != ''
184
182
uses : peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3
185
183
id : find-dyff-comment
186
184
with :
@@ -189,12 +187,10 @@ jobs:
189
187
body-includes : ' dyff of changes in rendered templates'
190
188
191
189
- name : Create or update comment
190
+ if : github.event.pull_request.number != ''
192
191
uses : peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
193
192
with :
194
193
comment-id : ${{ steps.find-dyff-comment.outputs.comment-id }}
195
194
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 }}
195
+ body-path : /tmp/dyff-output
200
196
edit-mode : replace
0 commit comments