protected-folders.yml 555 B

1234567891011121314151617181920
  1. name: Protected Folders Check
  2. on:
  3. pull_request:
  4. paths:
  5. - 'build/**'
  6. - 'docs/**'
  7. permissions:
  8. contents: read
  9. jobs:
  10. check:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Check for protected folder changes
  14. if: ${{ github.event.pull_request.author_association != 'OWNER' && github.event.pull_request.author_association != 'COLLABORATOR' }}
  15. run: |
  16. echo "::error::The 'build' and 'docs' folders are auto-generated and cannot be modified in PRs. Please remove these changes from your PR."
  17. exit 1
粤ICP备19079148号