From 6fc19eb3d36037197ebdd10ab0c8be559e237b27 Mon Sep 17 00:00:00 2001 From: Ben Nibbelink Date: Fri, 22 Mar 2024 22:02:54 -0500 Subject: [PATCH] add commit hash to pr comment --- .github/workflows/build_test.yml | 11 +++++++++-- .github/workflows/pr_comment.yml | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 8d62f4bcb..8a5579ef3 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -123,9 +123,16 @@ jobs: - name: Save PR number to file run: | echo "${{ github.event.number }}" > pr_number + echo "${{ github.event.pull_request.head.sha }}" > commit_hash - - name: Upload artifact + - name: Upload PR number artifact uses: actions/upload-artifact@v4 with: name: pr_number - path: pr_number \ No newline at end of file + path: pr_number + + - name: Upload Commit hash artifact + uses: actions/upload-artifact@v4 + with: + name: commit_hash + path: commit_hash \ No newline at end of file diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml index a2632a915..361089378 100644 --- a/.github/workflows/pr_comment.yml +++ b/.github/workflows/pr_comment.yml @@ -20,7 +20,7 @@ jobs: - name: Merge artifacts and get PR number run: | - echo "### Build Status Report" > artifacts_merged.md + echo "### Build Status Report - $(cat commit_hash)" > artifacts_merged.md cat ./*.txt >> artifacts_merged.md echo "PR_NUMBER=$(cat pr_number)" >> "$GITHUB_ENV"