File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Block specific changes
2
+
3
+ on :
4
+ pull_request :
5
+
6
+ jobs :
7
+ block-direct-markdown-module-changes :
8
+ name : Block modifying Markdown Module Reference files directly
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout repository
12
+ uses : actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 # v4.2.2
13
+ with :
14
+ fetch-depth : 0
15
+ - name : Check for changes in /nginx/module_reference
16
+ id : check_module_changes
17
+ run : |
18
+ FOLDER_DIR="content/nginx/module_reference"
19
+ git diff origin/main -- $FOLDER_DIR > changes.txt
20
+
21
+ if [[ -s changes.txt ]]; then
22
+ echo "Changes detected for $FOLDER_DIR"
23
+ echo "CHANGES_DETECTED=true" >> $GITHUB_OUTPUT
24
+ else
25
+ echo "CHANGES_DETECTED=false" >> $GITHUB_OUTPUT
26
+ fi
27
+ - name : Fail job and generate PR comment if changes detected
28
+ if : steps.check_module_changes.outputs.CHANGES_DETECTED == 'true'
29
+ run : |
30
+ echo "Hi"
You can’t perform that action at this time.
0 commit comments