Skip to content

Commit 6a10d36

Browse files
authored
ci: compose compare pr comment as file (#2910)
1 parent d51ee5d commit 6a10d36

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

.github/workflows/svcaplbot-run-dyff.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ jobs:
4444
needs: check-commit
4545
if: ${{ github.event_name == 'workflow_dispatch' || (success() && needs.check-commit.outputs.skip != 'true') }}
4646
steps:
47-
- name: Debug
48-
run: |
49-
echo "Skip was: ${{ needs.check-commit.outputs.skip }}"
5047
- name: Install GitHub CLI
5148
run: |
5249
sudo apt update
@@ -88,11 +85,9 @@ jobs:
8885
run: |
8986
mkdir -p tmp
9087
"$GITHUB_WORKSPACE/pr/bin/compare.sh" "$GITHUB_WORKSPACE/base" "$GITHUB_WORKSPACE/pr" --diff-output tmp/diff-output.txt
91-
diff_text=$(cat tmp/diff-output.txt)
92-
format_code_start='```diff'
93-
format_code_end='```'
94-
comment_text="Comparison of Helm chart templating output:
95-
$format_code_start
96-
$diff_text
97-
$format_code_end"
98-
cd "$GITHUB_WORKSPACE/pr" && gh pr comment ${{ github.event.pull_request.number }} --body "$comment_text"
88+
comment_file="$PWD/tmp/pr-comment.txt"
89+
echo "Comparison of Helm chart templating output:" > "$comment_file"
90+
echo '```diff' >> "$comment_file"
91+
cat tmp/diff-output.txt >> "$comment_file"
92+
echo '```' >> "$comment_file"
93+
cd "$GITHUB_WORKSPACE/pr" && gh pr comment ${{ github.event.pull_request.number }} --body-file "$comment_file"

0 commit comments

Comments
 (0)