File tree Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Original file line number Diff line number Diff line change 11
11
12
12
# lock down all permissions by default
13
13
permissions :
14
- contents : read
15
- issues : read
16
- pull-requests : read
17
- id-token : read
18
- security-events : read
19
- actions : read
20
- checks : write
21
- deployments : read
22
- discussions : read
23
- packages : read
24
- statuses : write
14
+ contents : read # needed to check out code
15
+ checks : write # needed for test results
16
+ pull-requests : read # needed for PR metadata
17
+ actions : read # needed to use actions
18
+ security-events : none
19
+ statuses : write # needed to update commit status
25
20
26
21
concurrency :
27
22
group : ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
40
35
jobs :
41
36
testing-imports :
42
37
runs-on : ${{ matrix.os }}
38
+ if : github.event_name != 'pull_request_target'
43
39
strategy :
44
40
fail-fast : false
45
41
matrix :
49
45
steps :
50
46
- name : Checkout generic
51
47
uses : actions/checkout@v4
52
- if : github.event_name != 'pull_request_target'
53
- - name : Checkout for `pull_request_target`
54
- uses : actions/checkout@v4
55
- if : github.event_name == 'pull_request_target'
56
- with :
57
- ref : ${{ github.event.pull_request.head.sha }}
58
48
- uses : actions/setup-python@v5
59
49
with :
60
50
python-version : ${{ matrix.python-version }}
You can’t perform that action at this time.
0 commit comments