Skip to content

<Web> Interface check PR comment #942

<Web> Interface check PR comment

<Web> Interface check PR comment #942

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 }}