agent-exec transport 4b30cafa202e866c87d58d98bc10e04d/b3dfd610807d
This commit is contained in:
+16
-6
@@ -13,12 +13,17 @@ jobs:
|
|||||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
# 自包含检出(runner 无法访问 github.com 上的 actions/checkout):固定 SHA 浅取回,凭据只以 URL 限定的 extraheader 存在于单个 git 进程。
|
# 自包含检出(runner 无法访问 github.com 上的 actions/checkout):固定 SHA 浅取回;凭据只经 GIT_CONFIG_* 环境变量以 URL 限定的 extraheader 传给单个 git 进程(不进命令行、不持久化);强制检出并清理遗留文件,等价 actions/checkout 的 clean。
|
||||||
case "$GITHUB_SHA" in *[!0-9a-fA-F]*|"") echo "Checkout requires a fixed commit SHA" >&2; exit 1;; esac
|
case "$GITHUB_SHA" in *[!0-9a-fA-F]*|"") echo "Checkout requires a fixed commit SHA" >&2; exit 1;; esac
|
||||||
url="${GITHUB_SERVER_URL%/}/${GITHUB_REPOSITORY}.git"
|
url="${GITHUB_SERVER_URL%/}/${GITHUB_REPOSITORY}.git"
|
||||||
git init -q .
|
git init -q .
|
||||||
git -c "http.${url}.extraheader=AUTHORIZATION: token ${TOKEN}" -c credential.helper= -c core.hooksPath=/dev/null fetch -q --depth=1 "$url" "$GITHUB_SHA"
|
GIT_CONFIG_COUNT=3 \
|
||||||
git checkout -q --detach FETCH_HEAD
|
GIT_CONFIG_KEY_0="http.${url}.extraheader" GIT_CONFIG_VALUE_0="AUTHORIZATION: token ${TOKEN}" \
|
||||||
|
GIT_CONFIG_KEY_1=credential.helper GIT_CONFIG_VALUE_1= \
|
||||||
|
GIT_CONFIG_KEY_2=core.hooksPath GIT_CONFIG_VALUE_2=/dev/null \
|
||||||
|
git fetch -q --depth=1 "$url" "$GITHUB_SHA"
|
||||||
|
git checkout -q -f --detach FETCH_HEAD
|
||||||
|
git clean -ffdxq
|
||||||
unset TOKEN
|
unset TOKEN
|
||||||
- run: go vet ./... && go test -count=1 ./...
|
- run: go vet ./... && go test -count=1 ./...
|
||||||
docker-checkout-hostgateway:
|
docker-checkout-hostgateway:
|
||||||
@@ -32,11 +37,16 @@ jobs:
|
|||||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
# 自包含检出(runner 无法访问 github.com 上的 actions/checkout):固定 SHA 浅取回,凭据只以 URL 限定的 extraheader 存在于单个 git 进程。
|
# 自包含检出(runner 无法访问 github.com 上的 actions/checkout):固定 SHA 浅取回;凭据只经 GIT_CONFIG_* 环境变量以 URL 限定的 extraheader 传给单个 git 进程(不进命令行、不持久化);强制检出并清理遗留文件,等价 actions/checkout 的 clean。
|
||||||
case "$GITHUB_SHA" in *[!0-9a-fA-F]*|"") echo "Checkout requires a fixed commit SHA" >&2; exit 1;; esac
|
case "$GITHUB_SHA" in *[!0-9a-fA-F]*|"") echo "Checkout requires a fixed commit SHA" >&2; exit 1;; esac
|
||||||
url="${GITHUB_SERVER_URL%/}/${GITHUB_REPOSITORY}.git"
|
url="${GITHUB_SERVER_URL%/}/${GITHUB_REPOSITORY}.git"
|
||||||
git init -q .
|
git init -q .
|
||||||
git -c "http.${url}.extraheader=AUTHORIZATION: token ${TOKEN}" -c credential.helper= -c core.hooksPath=/dev/null fetch -q --depth=1 "$url" "$GITHUB_SHA"
|
GIT_CONFIG_COUNT=3 \
|
||||||
git checkout -q --detach FETCH_HEAD
|
GIT_CONFIG_KEY_0="http.${url}.extraheader" GIT_CONFIG_VALUE_0="AUTHORIZATION: token ${TOKEN}" \
|
||||||
|
GIT_CONFIG_KEY_1=credential.helper GIT_CONFIG_VALUE_1= \
|
||||||
|
GIT_CONFIG_KEY_2=core.hooksPath GIT_CONFIG_VALUE_2=/dev/null \
|
||||||
|
git fetch -q --depth=1 "$url" "$GITHUB_SHA"
|
||||||
|
git checkout -q -f --detach FETCH_HEAD
|
||||||
|
git clean -ffdxq
|
||||||
unset TOKEN
|
unset TOKEN
|
||||||
- run: test -f go.mod && echo "docker-mode checkout via host-gateway OK"
|
- run: test -f go.mod && echo "docker-mode checkout via host-gateway OK"
|
||||||
|
|||||||
@@ -37,6 +37,6 @@
|
|||||||
|
|
||||||
- 子模块固定 `deps/development-guidelines` @ `2688fd2be6a52c0bf110e7e6366b6f291ab5e4eb`;共享执行器 `deps/development-manager` @ `bd3a7de57a3a9e1a4495b94c5fa5c08d71e7be8c`。
|
- 子模块固定 `deps/development-guidelines` @ `2688fd2be6a52c0bf110e7e6366b6f291ab5e4eb`;共享执行器 `deps/development-manager` @ `bd3a7de57a3a9e1a4495b94c5fa5c08d71e7be8c`。
|
||||||
- 挂载不改变 `go test` 行为。
|
- 挂载不改变 `go test` 行为。
|
||||||
- 既有文件(`AGENTS.md`、`PROJECT.md`、`AGENT-EXECUTION.md`、本文件)经 `governance init --adopt` 保留内容;新增文件为 `scripts/`、`.task/templates/task-card.md`、`.gitea/workflows/governance.yml`。
|
- 既有文件(`AGENTS.md`、`PROJECT.md`、本文件)经 `governance init --adopt` 保留内容;新增文件为 `AGENT-EXECUTION.md`、`scripts/`、`.task/templates/task-card.md`、`.gitea/workflows/governance.yml`。
|
||||||
- 回退只恢复 gitlink、`.gitmodules` 与新增入口文件(`scripts/`、`.gitea/workflows/governance.yml`、`.task/templates/task-card.md`),不改码值。
|
- 回退只恢复两个 gitlink 与 `.gitmodules` 条目(`deps/development-guidelines` 回到 R0 固定值 `26b562d2e34f`,`deps/development-manager` 移除),删除本 PR 新增的 `scripts/dm`、`scripts/agent-exec`、`scripts/task`、`scripts/hooks/pre-commit`、`.gitea/workflows/governance.yml`、`.task/templates/task-card.md`、`AGENT-EXECUTION.md`,移除 `AGENTS.md`、`PROJECT.md` 中追加的节,并将 `.gitea/workflows/ci.yml` 的两处检出步骤恢复为 `uses: actions/checkout@v4`;不改码值。
|
||||||
- `.gitea/workflows/ci.yml` 的两处 `uses: actions/checkout@v4` 已替换为自包含的内联检出步骤,因为 runner 无法访问 github.com;各作业的运行步骤保持不变。
|
- `.gitea/workflows/ci.yml` 的两处 `uses: actions/checkout@v4` 已替换为自包含的内联检出步骤,因为 runner 无法访问 github.com;各作业的运行步骤保持不变。
|
||||||
|
|||||||
Reference in New Issue
Block a user