File tree Expand file tree Collapse file tree 1 file changed +33
-3
lines changed Expand file tree Collapse file tree 1 file changed +33
-3
lines changed Original file line number Diff line number Diff line change 6
6
- main
7
7
types :
8
8
- opened
9
- - labeled
10
- - unlabeled
9
+ - synchronize
11
10
12
11
jobs :
13
12
pr-message :
14
13
runs-on : ubuntu-latest
15
14
permissions :
16
15
pull-requests : write
17
16
steps :
18
- - uses : mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
17
+ - name : Checkout repo
18
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19
+ with :
20
+ fetch-depth : 0
21
+ submodules : false
22
+
23
+ - name : Filter paths
24
+ id : filter
25
+ run : |
26
+ MERGE_BASE=$(git merge-base origin/${GITHUB_BASE_REF} origin/${GITHUB_HEAD_REF})
27
+ FILES=$(git diff --name-only $MERGE_BASE origin/${GITHUB_HEAD_REF})
28
+ IGNORE=true
29
+ for FILE in $FILES; do
30
+ if [[ $FILE != plugins/* && $FILE != .github/* ]]; then
31
+ IGNORE=false
32
+ break
33
+ fi
34
+ done
35
+
36
+ if $IGNORE; then
37
+ echo "ignore=true" >> $GITHUB_OUTPUT
38
+ echo "Filter result code: ignore = true"
39
+ else
40
+ echo "ignore=false" >> $GITHUB_OUTPUT
41
+ echo "Filter result code: ignore = false"
42
+ fi
43
+ shell : bash
44
+
45
+ - name : Add PR comment
46
+ if : steps.filter.outputs.ignore == 'false'
47
+ uses : mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2.8.2
19
48
with :
20
49
message : >
21
50
### 📝 PRs merging into main branch
27
56
branch when the code complete and ready to be released.
28
57
29
58
- name : Success
59
+ if : steps.filter.outputs.ignore == 'false'
30
60
run : exit 0
You can’t perform that action at this time.
0 commit comments