From faf8b5e7ce102d52269fc25719acc25c550ab66b Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sat, 9 Sep 2023 19:45:11 +0800 Subject: [PATCH] Fix prevent-file-change (#3722) --- .github/workflows/auto-test.yml | 11 ----------- .github/workflows/prevent-file-change.yml | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/prevent-file-change.yml diff --git a/.github/workflows/auto-test.yml b/.github/workflows/auto-test.yml index e56538be..40ca1f9e 100644 --- a/.github/workflows/auto-test.yml +++ b/.github/workflows/auto-test.yml @@ -14,17 +14,6 @@ on: - '*.md' 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 - auto-test: needs: [ check-linters ] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/prevent-file-change.yml b/.github/workflows/prevent-file-change.yml new file mode 100644 index 00000000..0af3a6cb --- /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 +