Skip to content

Commit

Permalink
add commit hash to pr comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibbelink committed Mar 23, 2024
1 parent 945211c commit 6fc19eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
path: pr_number

- name: Upload Commit hash artifact
uses: actions/upload-artifact@v4
with:
name: commit_hash
path: commit_hash
2 changes: 1 addition & 1 deletion .github/workflows/pr_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6fc19eb

Please sign in to comment.