summaryrefslogtreecommitdiffstats
path: root/.github/workflows/prevent-file-change.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/prevent-file-change.yml')
-rw-r--r--.github/workflows/prevent-file-change.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/.github/workflows/prevent-file-change.yml b/.github/workflows/prevent-file-change.yml
new file mode 100644
index 0000000..0af3a6c
--- /dev/null
+++ b/.github/workflows/prevent-file-change.yml
@@ -0,0 +1,17 @@
+name: prevent-file-change
+
+on:
+ pull_request:
+
+jobs:
+ check-file-changes:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Prevent file change
+ uses: xalvarez/prevent-file-change-action@v1
+ with:
+ githubToken: ${{ secrets.GITHUB_TOKEN }}
+ # Regex, /src/lang/*.json is not allowed to be changed, except for /src/lang/en.json
+ pattern: '^(?!src/lang/en\.json$)src/lang/.*\.json$'
+ trustedAuthors: UptimeKumaBot
+