fix: update actions improved repository checkout configuration

This commit is contained in:
insleker 2025-12-16 00:06:02 +08:00
parent 7d926358bc
commit 09d058fb6c
2 changed files with 13 additions and 1 deletions

View File

@ -19,7 +19,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: ${{ github.repository }}
ref: refs/pull/${{ github.event.pull_request.number }}/merge
fetch-depth: 1
persist-credentials: false
- name: Setup Flutter
if: github.event.action != 'closed'

View File

@ -26,11 +26,18 @@ jobs:
uses: actions/checkout@v6
continue-on-error: true
id: checkout_https
with:
repository: ${{ github.repository }}
ref: refs/pull/${{ github.event.pull_request.number }}/merge
fetch-depth: 1
persist-credentials: false
- name: Checkout repository via SSH (fallback)
if: steps.checkout_https.outcome == 'failure'
uses: actions/checkout@v6
with:
repository: ${{ github.repository }}
ref: refs/pull/${{ github.event.pull_request.number }}/merge
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh-strict: false