forked from cyclus/cyclus
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (28 loc) · 1000 Bytes
/
pr_comment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Comment on PR
on:
workflow_run:
workflows: ["Build/Test Cyclus"]
types:
- completed
jobs:
pr-comment:
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
merge-multiple: true
- name: Merge artifacts and get PR number
run: |
echo "### Downstream Build Status Report - $(cat commit_hash_timestamp)" > artifacts_merged.md
cat ./*.txt >> artifacts_merged.md
echo "PR_NUMBER=$(cat pr_number)" >> "$GITHUB_ENV"
- name: PR Comment
uses: thollander/actions-comment-pull-request@v2
with:
pr_number: ${{ env.PR_NUMBER }}
comment_tag: build_status_report
filePath: artifacts_merged.md