-
Notifications
You must be signed in to change notification settings - Fork 92
66 lines (54 loc) · 1.48 KB
/
pull_request.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
57
58
59
60
61
62
63
64
65
66
# Check Pull Requests
# See also: .github/workflows/scripts
name: PR Check and Report
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
issues: write
on:
pull_request:
branches:
- master
types:
- opened
- synchronize
- closed
jobs:
pr-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate checkbox # See pull_request_template.md
uses: roryq/checkmate@master
continue-on-error: true
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-:
- name: Setup Requirements
run: |
pip install -r scripts/requirements.txt
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
json: true
write_output_files: true
- name: Check and Report
run: |
python .github/workflows/scripts/check.py
env:
# scripts
github_api_token: ${{ secrets.GITHUB_TOKEN }}
EVENT_TYPE: ${{ github.event.action }}
IS_MERGED: ${{ github.event.pull_request.merged }}
# gh_cli
PR_NUMBER: ${{ github.event.number }}