-
Notifications
You must be signed in to change notification settings - Fork 58
42 lines (40 loc) · 1.17 KB
/
checker.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: Checker
on:
pull_request_target:
branches:
- main
jobs:
checker:
runs-on: ubuntu-latest
permissions:
pull-requests: write
name: PR Checker
steps:
- name: Setup Python Environment
uses: actions/setup-python@main
with:
python-version: "3.10"
- name: Checkout Code
uses: actions/checkout@main
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Add RAW Remote
run: |
git remote add raw https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git
git fetch raw
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
with:
base_sha: remotes/raw/main
- name: Run Checker
run: |
pip3 install pyyaml IPy netaddr
python3 script/checker.py ${{steps.changed-files.outputs.all_changed_files}} > result.txt
- name: Reply to PR
uses: thollander/actions-comment-pull-request@v2
if: always()
with:
filePath: result.txt