diff --git a/.github/workflows/prevent-file-change.yml b/.github/workflows/prevent-file-change.yml new file mode 100644 index 0000000..7d55888 --- /dev/null +++ b/.github/workflows/prevent-file-change.yml @@ -0,0 +1,16 @@ +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: '^(?!frontend/src/lang/en\.json$)frontend/src/lang/.*\.json$' + trustedAuthors: UptimeKumaBot