-
Notifications
You must be signed in to change notification settings - Fork 13
42 lines (35 loc) · 1 KB
/
validate-pull-request.yml
File metadata and controls
42 lines (35 loc) · 1 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
name: Validate Pull Request
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
issues: write
jobs:
validate-metadata:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: '**/*'
dir_names: true
dir_names_max_depth: 2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Validate pull request and post comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_EVENT_PATH: ${{ github.event_path }}
PR_NUMBER: ${{ github.event.number }}
run: node scripts/validate-pull-request.js ${{ steps.changed-files.outputs.all_changed_files }}