@@ -255,23 +255,15 @@ jobs:
255255 success : ${{ steps.build.outputs.success }}
256256
257257 steps :
258- - name : Generate GitHub App Token
259- id : app-token
260- if : inputs.github_app_auth != false
261- uses : actions/create-github-app-token@v2
258+ - name : Checkout with GitHub App
259+ uses : zondax/_actions/checkout-with-app@main
262260 with :
263- app-id : ${{ secrets.app_id }}
264- private-key : ${{ secrets.app_pem }}
265- repositories : ${{ inputs.github_app_repos }}
266-
267- - name : Checkout repository
268- uses : actions/checkout@v4
269- with :
270- submodules : ${{ inputs.checkout_submodules }}
271- token : ${{ steps.app-token.outputs.token || github.token }}
272-
273- - name : Patch git clone
274- run : sudo git config --system --add safe.directory '*'
261+ github_app_auth : ${{ inputs.github_app_auth }}
262+ github_app_repos : ${{ inputs.github_app_repos }}
263+ checkout_submodules : ${{ inputs.checkout_submodules }}
264+ use_sudo : true
265+ app_id : ${{ secrets.app_id }}
266+ app_pem : ${{ secrets.app_pem }}
275267
276268 - name : Setup Node.js
277269 uses : actions/setup-node@v4
@@ -478,23 +470,15 @@ jobs:
478470 release_id : ${{ steps.release.outputs.id }}
479471
480472 steps :
481- - name : Generate GitHub App Token
482- id : app-token
483- if : inputs.github_app_auth != false
484- uses : actions/create-github-app-token@v2
473+ - name : Checkout with GitHub App
474+ uses : zondax/_actions/checkout-with-app@main
485475 with :
486- app-id : ${{ secrets.app_id }}
487- private-key : ${{ secrets.app_pem }}
488- repositories : ${{ inputs.github_app_repos }}
489-
490- - name : Checkout repository
491- uses : actions/checkout@v4
492- with :
493- submodules : ${{ inputs.checkout_submodules }}
494- token : ${{ steps.app-token.outputs.token || github.token }}
495-
496- - name : Patch git clone
497- run : sudo git config --system --add safe.directory '*'
476+ github_app_auth : ${{ inputs.github_app_auth }}
477+ github_app_repos : ${{ inputs.github_app_repos }}
478+ checkout_submodules : ${{ inputs.checkout_submodules }}
479+ use_sudo : true
480+ app_id : ${{ secrets.app_id }}
481+ app_pem : ${{ secrets.app_pem }}
498482
499483 - name : Download all artifacts
500484 uses : actions/download-artifact@v4
0 commit comments