-
Notifications
You must be signed in to change notification settings - Fork 765
41 lines (37 loc) · 1.4 KB
/
check_paths.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
name: Check paths
on:
workflow_call:
# Map the workflow outputs to job outputs
outputs:
githubfolder:
description: "changes to .github folder"
value: ${{ jobs.check_paths.githubfolder }}
push:
paths:
- "**/*"
- "!.github/**" # Important: Exclude PRs related to .github from auto-run
- "!.github/workflows/**" # Important: Exclude PRs related to .github/workflows from auto-run
- "!.github/actions/**" # Important: Exclude PRs related to .github/actions from auto-run
pull_request_target:
branches: ["master"]
paths:
- "**/*"
- "!.github/**" # Important: Exclude PRs related to .github from auto-run
- "!.github/workflows/**" # Important: Exclude PRs related to .github/workflows from auto-run
- "!.github/actions/**" # Important: Exclude PRs related to .github/actions from auto-run
permissions:
contents: read
jobs:
check_paths:
runs-on: ubuntu-24.04
outputs:
githubfolder: ${{ steps.filter.outputs.githubfolder }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
base: "master" # needed to set as a called workflow does not have direct access to repository.default_branch
filters: |
githubfolder:
- '.github/**'