提交记录修改.github/workflows/linux-build.yml+3 −0看文件
| @@ -42,6 +42,9 @@ jobs: | ||
| 42 | 42 | CAGE_BUILD_REF: ${{ inputs.ref }} |
| 43 | 43 | CAGE_RELEASE: ${{ inputs.release }} |
| 44 | 44 | run: | |
| 45 | 新增: # checkout's temporary HOME does not persist into later container | |
| 46 | 新增: # steps. Trust this CI-owned checkout only, before root builds it. | |
| 47 | 新增: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| 45 | 48 | [[ "$CAGE_BUILD_REF" =~ ^[0-9a-fA-F]{40}$ ]] || { echo 'Build ref must be a complete commit SHA.' >&2; exit 1; } |
| 46 | 49 | [[ "$(git rev-parse HEAD)" == "${CAGE_BUILD_REF,,}" ]] || { echo 'Checkout differs from the requested commit.' >&2; exit 1; } |
| 47 | 50 | if [[ "$CAGE_RELEASE" == true && "$GITHUB_EVENT_NAME" != workflow_dispatch ]]; then |

