Create 4211117371 #216
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |