Skip to content

Commit 1b7da67

Browse files
committed
tested ok: now make correct truncate
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
1 parent 4663b1c commit 1b7da67

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/pr-comment.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ jobs:
117117
if [[ "${SIZE}" -gt "${{ env.MAX_MESSAGE_SIZE }}" ]] ; then
118118
# truncate the message up to MAX_MESSAGE_SIZE
119119
head -c ${{ env.MAX_MESSAGE_SIZE }} "${MESSAGE_FILE}" > /tmp/truncated
120-
echo > /tmp/truncated
121-
echo "... (truncated)" > /tmp/truncated
120+
echo >> /tmp/truncated
121+
echo "... (truncated)" >> /tmp/truncated
122122
mv /tmp/truncated "${MESSAGE_FILE}"
123-
echo "::warning:: comment message with size ${SIZE} has been truncated to ${{ env.MAX_MESSAGE_SIZE }} bytes."
123+
echo "::warning:: ${{ inputs.artifact_name }} comment message with size ${SIZE} has been truncated to ${{ env.MAX_MESSAGE_SIZE }} bytes."
124124
fi
125125
126126
- name: Find previous PR comment
@@ -148,4 +148,4 @@ jobs:
148148

149149
- name: Notify
150150
run: |
151-
echo "::notice::Commented pull request ${{ inputs.pr_number }}"
151+
echo "::notice::Commented pull request ${{ inputs.pr_number }} with ${{ inputs.artifact_name }}"

0 commit comments

Comments
 (0)