-
Notifications
You must be signed in to change notification settings - Fork 1.6k
48 lines (48 loc) · 1.25 KB
/
targeting-repo-files.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
# This workflow verifies that an author submitting a pull request to the main
# branch to modify repository files is authorized to do so; only users with
# maintainer or admin rights may modify the actions or the workflow definitions.
name: Authorization
on:
pull_request_target:
branches:
- main
paths:
- "*.yml"
- .github/**
- .localization-config
- .openpublishing*
- LICENSE*
- reference/docfx.json
- reference/mapping/**
- tests/**
- ThirdPartyNotices
- tools/**
permissions:
contents: read
jobs:
Test:
name: Check Repo File Permissions
runs-on: windows-latest
defaults:
run:
shell: pwsh
steps:
- name: Checkout Repository
id: checkout_repo
uses: actions/checkout@v4
- name: Authorized to Modify Repo Files?
uses: ./.github/actions/verification/authorization/v1
with:
token: ${{ github.token }}
target: |
path:
*.yml
.github/**
.localization-config
.openpublishing*
LICENSE*
reference/docfx.json
reference/mapping/**
tests/**
ThirdPartyNotices
tools/**