From 62b4758bcada1bcc1a60d743a586154cdf230927 Mon Sep 17 00:00:00 2001 From: Gunter Labes <soliton@wesnoth.org> Date: Mon, 10 Mar 2025 02:40:34 +0100 Subject: [PATCH] Use a file for the comment body Also fix the path to the old map file for dimension calculation. --- .github/workflows/map-diff.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/map-diff.yml b/.github/workflows/map-diff.yml index d4000051c5b..745d132c1c6 100644 --- a/.github/workflows/map-diff.yml +++ b/.github/workflows/map-diff.yml @@ -44,7 +44,7 @@ jobs: log "Check out $map_path from $SHA..." new_map=${map_path##*/} git show "$SHA":"$map_path" > "$new_map" - old_dim=$(dim "$map_path") + old_dim=$(dim "../../$map_path") new_dim=$(dim "$new_map") log "Generate map diff image for $map_path..." @@ -69,17 +69,17 @@ jobs: done [[ $comment_body ]] || err Failed to generate comment - printf 'COMMENT_BODY=%s\n' "$comment_body" >> "$GITHUB_OUTPUT" + printf '%s\n' "$comment_body" > body.html - name: Find comment - uses: peter-evans/find-comment@v2 + uses: peter-evans/find-comment@v3 id: fc with: issue-number: ${{ github.event.pull_request.number }} comment-author: 'github-actions[bot]' - name: Add comment - uses: peter-evans/create-or-update-comment@v3 + uses: peter-evans/create-or-update-comment@v4 with: issue-number: ${{ github.event.pull_request.number }} comment-id: ${{ steps.fc.outputs.comment-id }} edit-mode: replace - body: ${{ steps.get-maps-diff.outputs.COMMENT_BODY }} + body-path: utils/wesnoth-map-diff/body.html