






















@@ -76,14 +76,16 @@ jobs:
7676android_matrix: ${{ steps.manifest.outputs.android_matrix }}
7777steps:
7878 - name: Checkout
79-uses: actions/checkout@v6
80-with:
81-ref: ${{ inputs.target_ref || github.sha }}
82-fetch-depth: 1
83-fetch-tags: false
84-token: ""
85-persist-credentials: false
86-submodules: false
79+env:
80+CHECKOUT_REPO: ${{ github.repository }}
81+CHECKOUT_REF: ${{ inputs.target_ref || github.sha }}
82+run: |
83+ set -euo pipefail
84+ git init "$GITHUB_WORKSPACE"
85+ git -C "$GITHUB_WORKSPACE" config gc.auto 0
86+ git -C "$GITHUB_WORKSPACE" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
87+ git -C "$GITHUB_WORKSPACE" fetch --no-tags --depth=1 origin "+${CHECKOUT_REF}:refs/remotes/origin/checkout"
88+ git -C "$GITHUB_WORKSPACE" checkout --detach refs/remotes/origin/checkout
87898890 - name: Resolve checkout SHA
8991id: checkout_ref
@@ -300,14 +302,16 @@ jobs:
300302PRE_COMMIT_HOME: .cache/pre-commit-security-fast
301303steps:
302304 - name: Checkout
303-uses: actions/checkout@v6
304-with:
305-ref: ${{ inputs.target_ref || github.sha }}
306-fetch-depth: 1
307-fetch-tags: false
308-token: ""
309-persist-credentials: false
310-submodules: false
305+env:
306+CHECKOUT_REPO: ${{ github.repository }}
307+CHECKOUT_REF: ${{ inputs.target_ref || github.sha }}
308+run: |
309+ set -euo pipefail
310+ git init "$GITHUB_WORKSPACE"
311+ git -C "$GITHUB_WORKSPACE" config gc.auto 0
312+ git -C "$GITHUB_WORKSPACE" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
313+ git -C "$GITHUB_WORKSPACE" fetch --no-tags --depth=1 origin "+${CHECKOUT_REF}:refs/remotes/origin/checkout"
314+ git -C "$GITHUB_WORKSPACE" checkout --detach refs/remotes/origin/checkout
311315312316 - name: Ensure security base commit
313317if: github.event_name != 'workflow_dispatch'
@@ -1399,13 +1403,13 @@ jobs:
13991403install-bun: "false"
1400140414011405 - name: Checkout ClawHub docs source
1402-uses: actions/checkout@v6
1403-with:
1404-repository: openclaw/clawhub
1405-path: clawhub-source
1406-fetch-depth: 1
1407-token: ""
1408-persist-credentials: false
1406+run: |
1407+ set -euo pipefail
1408+ git init clawhub-source
1409+ git -C clawhub-source config gc.auto 0
1410+ git -C clawhub-source remote add origin "https://github.com/openclaw/clawhub.git"
1411+ git -C clawhub-source fetch --no-tags --depth=1 origin "+HEAD:refs/remotes/origin/checkout"
1412+ git -C clawhub-source checkout --detach refs/remotes/origin/checkout
1409141314101414 - name: Check docs
14111415env:
@@ -1421,12 +1425,16 @@ jobs:
14211425timeout-minutes: 20
14221426steps:
14231427 - name: Checkout
1424-uses: actions/checkout@v6
1425-with:
1426-ref: ${{ needs.preflight.outputs.checkout_revision }}
1427-token: ""
1428-persist-credentials: false
1429-submodules: false
1428+env:
1429+CHECKOUT_REPO: ${{ github.repository }}
1430+CHECKOUT_SHA: ${{ needs.preflight.outputs.checkout_revision }}
1431+run: |
1432+ set -euo pipefail
1433+ git init "$GITHUB_WORKSPACE"
1434+ git -C "$GITHUB_WORKSPACE" config gc.auto 0
1435+ git -C "$GITHUB_WORKSPACE" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
1436+ git -C "$GITHUB_WORKSPACE" fetch --no-tags --depth=1 origin "+${CHECKOUT_SHA}:refs/remotes/origin/checkout"
1437+ git -C "$GITHUB_WORKSPACE" checkout --detach refs/remotes/origin/checkout
1430143814311439 - name: Setup Python
14321440uses: actions/setup-python@v6
@@ -1465,12 +1473,16 @@ jobs:
14651473matrix: ${{ fromJson(needs.preflight.outputs.checks_windows_matrix) }}
14661474steps:
14671475 - name: Checkout
1468-uses: actions/checkout@v6
1469-with:
1470-ref: ${{ needs.preflight.outputs.checkout_revision }}
1471-token: ""
1472-persist-credentials: false
1473-submodules: false
1476+env:
1477+CHECKOUT_REPO: ${{ github.repository }}
1478+CHECKOUT_SHA: ${{ needs.preflight.outputs.checkout_revision }}
1479+run: |
1480+ set -euo pipefail
1481+ git init "$GITHUB_WORKSPACE"
1482+ git -C "$GITHUB_WORKSPACE" config gc.auto 0
1483+ git -C "$GITHUB_WORKSPACE" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
1484+ git -C "$GITHUB_WORKSPACE" fetch --no-tags --depth=1 origin "+${CHECKOUT_SHA}:refs/remotes/origin/checkout"
1485+ git -C "$GITHUB_WORKSPACE" checkout --detach refs/remotes/origin/checkout
1474148614751487 - name: Try to exclude workspace from Windows Defender (best-effort)
14761488shell: pwsh
@@ -1559,12 +1571,16 @@ jobs:
15591571matrix: ${{ fromJson(needs.preflight.outputs.macos_node_matrix) }}
15601572steps:
15611573 - name: Checkout
1562-uses: actions/checkout@v6
1563-with:
1564-ref: ${{ needs.preflight.outputs.checkout_revision }}
1565-token: ""
1566-persist-credentials: false
1567-submodules: false
1574+env:
1575+CHECKOUT_REPO: ${{ github.repository }}
1576+CHECKOUT_SHA: ${{ needs.preflight.outputs.checkout_revision }}
1577+run: |
1578+ set -euo pipefail
1579+ git init "$GITHUB_WORKSPACE"
1580+ git -C "$GITHUB_WORKSPACE" config gc.auto 0
1581+ git -C "$GITHUB_WORKSPACE" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
1582+ git -C "$GITHUB_WORKSPACE" fetch --no-tags --depth=1 origin "+${CHECKOUT_SHA}:refs/remotes/origin/checkout"
1583+ git -C "$GITHUB_WORKSPACE" checkout --detach refs/remotes/origin/checkout
1568158415691585 - name: Setup Node environment
15701586uses: ./.github/actions/setup-node-env
@@ -1601,12 +1617,16 @@ jobs:
16011617timeout-minutes: 20
16021618steps:
16031619 - name: Checkout
1604-uses: actions/checkout@v6
1605-with:
1606-ref: ${{ needs.preflight.outputs.checkout_revision }}
1607-token: ""
1608-persist-credentials: false
1609-submodules: false
1620+env:
1621+CHECKOUT_REPO: ${{ github.repository }}
1622+CHECKOUT_SHA: ${{ needs.preflight.outputs.checkout_revision }}
1623+run: |
1624+ set -euo pipefail
1625+ git init "$GITHUB_WORKSPACE"
1626+ git -C "$GITHUB_WORKSPACE" config gc.auto 0
1627+ git -C "$GITHUB_WORKSPACE" remote add origin "https://github.com/${CHECKOUT_REPO}.git"
1628+ git -C "$GITHUB_WORKSPACE" fetch --no-tags --depth=1 origin "+${CHECKOUT_SHA}:refs/remotes/origin/checkout"
1629+ git -C "$GITHUB_WORKSPACE" checkout --detach refs/remotes/origin/checkout
1610163016111631 - name: Install XcodeGen / SwiftLint / SwiftFormat
16121632run: brew install xcodegen swiftlint swiftformat
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。