ci: restrict cla workflow to upstream repo

This commit is contained in:
shaw 2026-05-20 17:09:57 +08:00
parent 51f72186a5
commit 5c074e6fe8

View File

@ -15,8 +15,11 @@ permissions:
jobs:
cla-check:
if: |
github.event_name == 'issue_comment' ||
(github.event_name == 'pull_request_target' && github.event.action != 'closed')
github.repository == 'Wei-Shaw/sub2api' &&
(
github.event_name == 'issue_comment' ||
(github.event_name == 'pull_request_target' && github.event.action != 'closed')
)
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
@ -45,7 +48,11 @@ jobs:
custom-allsigned-prcomment: "All contributors have signed the CLA. ✅"
cla-lock:
if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true
if: |
github.repository == 'Wei-Shaw/sub2api' &&
github.event_name == 'pull_request_target' &&
github.event.action == 'closed' &&
github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: "Lock merged PR"