File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ name: "Lint PR"
22
33on :
44 pull_request_target :
5+ # BE CAREFUL - this event runs in the context of the default branch (`main`) workflow definition in the target
6+ # repository (NOT the fork's context), so it has potentially sensitive access.
7+ # It is critical that this only runs on very limited events and/or access to the repo
8+ # Read https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target
59 types :
610 - opened
711 - edited
Original file line number Diff line number Diff line change @@ -2,13 +2,21 @@ name: Publish Suppressions
22
33on :
44 workflow_dispatch :
5- push :
6- branches :
7- - generatedSuppressions
5+ pull_request_target :
6+ # BE CAREFUL - this event runs in the context of the default branch (`main`) workflow definition in the target
7+ # repository (NOT the fork's context), so it has potentially sensitive access.
8+ # It is critical that this only runs on very limited events and/or access to the repo
9+ # Read https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target
10+ types : [ closed ]
11+ branches : [ generatedSuppressions ]
12+ paths : [ generatedSuppressions.xml ]
13+
814
915permissions : {}
1016jobs :
1117 update_suppression :
18+ if : github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
19+
1220 permissions :
1321 contents : write # to push changes in repo (jamesives/github-pages-deploy-action)
1422
You can’t perform that action at this time.
0 commit comments