-
Notifications
You must be signed in to change notification settings - Fork 1.8k
42 lines (37 loc) · 1.33 KB
/
web-interface-check-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
33
34
35
36
37
38
39
40
41
42
name: <Web> Interface check PR comment
on:
workflow_run:
workflows: ["<Web> Interface check"]
types:
- completed
permissions:
issues: write
pull-requests: write
jobs:
post-pr-comment:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: 'Get source run informations'
uses: potiuk/get-workflow-origin@v1_1
id: source_run_info
with:
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}
- name: 'Debug'
run: |
Write-Host "Source PR Number: ${{ github.event.workflow_run.pull_requests[0].number }}"
shell: pwsh
- name: Download artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_ID: ${{ github.event.workflow_run.id }}
run: |
gh run download -R "${{ github.repository }}" --name "interface-diff.txt" "$RUN_ID"
- name: Post interface-diff.txt as comment
uses: marocchino/sticky-pull-request-comment@v2
with:
path: interface-diff.txt
number: ${{ steps.source_run_info.outputs.pullRequestNumber }}
# The following matters, see: https://github.com/orgs/community/discussions/25220
# number: ${{ github.event.workflow_run.pull_requests[0].number }}