-
-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (38 loc) · 1.42 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
42
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
branches: ["ci"]
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-latest
outputs:
githubfolder: ${{ steps.filter.outputs.githubfolder }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- 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/**'