@@ -40,40 +40,22 @@ inputs:
4040runs :
4141 using : " composite"
4242 steps :
43- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
44- if : inputs.ref == '' && github.event_name == 'issue_comment' && inputs.persist-credentials == 'true'
43+ - if : inputs.persist-credentials == 'false'
44+ uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4545 with :
46- ref : refs/pull/${{ github.event.issue.number }}/head
47- fetch-depth : ${{ inputs.fetch-depth }}
48- lfs : ${{ inputs.lfs }}
49- token : ${{ inputs.token || github.token }}
50- persist-credentials : true
51-
52- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
53- if : inputs.ref == '' && github.event_name == 'issue_comment' && inputs.persist-credentials != 'true'
54- with :
55- ref : refs/pull/${{ github.event.issue.number }}/head
46+ ref : ${{ inputs.ref == '' && github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || inputs.ref }}
5647 fetch-depth : ${{ inputs.fetch-depth }}
5748 lfs : ${{ inputs.lfs }}
49+ sparse-checkout : ${{ inputs.sparse-checkout }}
5850 token : ${{ inputs.token || github.token }}
5951 persist-credentials : false
6052
61- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
62- if : inputs.persist-credentials == 'true'
53+ - if : inputs.persist-credentials == 'true'
54+ uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
6355 with :
56+ ref : ${{ inputs.ref == '' && github.event_name == 'issue_comment' && format('refs/pull/{0}/head', github.event.issue.number) || inputs.ref }}
6457 fetch-depth : ${{ inputs.fetch-depth }}
6558 lfs : ${{ inputs.lfs }}
6659 sparse-checkout : ${{ inputs.sparse-checkout }}
67- ref : ${{ inputs.ref }}
6860 token : ${{ inputs.token || github.token }}
6961 persist-credentials : true
70-
71- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
72- if : inputs.persist-credentials != 'true'
73- with :
74- fetch-depth : ${{ inputs.fetch-depth }}
75- lfs : ${{ inputs.lfs }}
76- sparse-checkout : ${{ inputs.sparse-checkout }}
77- ref : ${{ inputs.ref }}
78- token : ${{ inputs.token || github.token }}
79- persist-credentials : false
0 commit comments