-
Notifications
You must be signed in to change notification settings - Fork 62
40 lines (34 loc) · 1.2 KB
/
pr_validation.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
name: PR mod validation
on:
pull_request:
branches:
- main
jobs:
run:
runs-on: ubuntu-latest
name: Test changed files
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
json: true
# Per example from the readme: set to false because we are using an
# environment variable to store the output and avoid command
# injection.
escape_json: false
- name: Validate the changes
env:
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
ADDED_FILES_COUNT: ${{ steps.changed-files.outputs.added_files_count }}
MODIFIED_FILES_COUNT: ${{ steps.changed-files.outputs.modified_files_count }}
ALL_CHANGED_AND_MODIFIED_FILES: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
ALL_CHANGED_AND_MODIFIED_FILES_COUNT: ${{ steps.changed-files.outputs.all_changed_and_modified_files_count }}
run: |
python .github/pr_validation.py