Repository navigation
52 lines (44 loc) · 1.58 KB
/
Copy pathpr-feedback.yml
File metadata and controls
52 lines (44 loc) · 1.58 KB
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
name: Post validation feedback
on:
workflow_run:
workflows: ["Validate and upload"]
types:
- completed
jobs:
feedback:
name: Post validation feedback
if: github.event.workflow_run.event == 'pull_request'
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
actions: read
contents: read
steps:
- name: Checkout from GitHub
uses: actions/checkout@v4
- name: Setup Python 3.x
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Python dependencies
run: pip install -r .scripts/requirements.txt
- name: Download validation results
id: download
uses: actions/download-artifact@v4
with:
name: pr-results
path: ${{ runner.temp }}/pr-results
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
- name: Post validation feedback
run: python .scripts/post_pr_feedback.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RESULTS_FILE: ${{ runner.temp }}/pr-results/pr_results.json
DOWNLOAD_OUTCOME: ${{ steps.download.outcome }}
WORKFLOW_RUN_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
WORKFLOW_RUN_HEAD_OWNER: ${{ github.event.workflow_run.head_repository.owner.login }}
WORKFLOW_RUN_HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
WORKFLOW_RUN_PULL_REQUESTS: ${{ toJSON(github.event.workflow_run.pull_requests) }}