forked from platformsh/platformsh-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 922 Bytes
/
comment-on-pr.yaml
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
# This PR runs separately fron the workflow that generates PR info.
# In this way, we get info from PRs from forked repositories
# without granting them extra permissions,
# but still allowing us to comment on the PRs.
name: Comment on PR
on:
workflow_run:
workflows: [Get info on PR]
types:
- completed
jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download info on PR
uses: dawidd6/action-download-artifact@v2
with:
workflow: get-pr-info.yaml
workflow_conclusion: success
name: pr-info
- name: Get PR number
id: pr_number
run: echo "::set-output name=pr_number::$(cat pr_number.txt)"
- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ steps.pr_number.outputs.pr_number }}
path: pr_comment.txt