-
Notifications
You must be signed in to change notification settings - Fork 127
56 lines (50 loc) · 1.65 KB
/
qns-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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Post test results as pull request comment.
#
# This is done as a separate workflow as it requires write permissions. The
# tests itself might run off of a fork, i.e. an untrusted environment and should
# thus not be granted write permissions.
name: QUIC Network Simulator Comment
on:
workflow_run:
workflows: ["QUIC Network Simulator"]
types:
- completed
jobs:
comment:
permissions:
pull-requests: write
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'failure'
steps:
- name: Download comment-data
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
name: comment-data
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Format GitHub comment
run: |
pwd
ls -la
echo '[**QUIC Interop Runner**](https://github.com/quic-interop/quic-interop-runner)' >> comment
echo '' >> comment
echo '```' >> comment
cat summary >> comment
echo '```' >> comment
echo '' >> comment
echo 'Download artifacts [here](' >> comment
cat logs-url >> comment
echo ').' >> comment
shell: bash
- name: Read PR Number
id: pr-number
run: echo "::set-output name=number::$(cat pr-number)"
shell: bash
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
filePath: comment
pr_number: ${{ steps.pr-number.outputs.number }}
comment_tag: quic-network-simulator-comment