ci: authenticate release-check reachability fetches · openclaw/openclaw@0c192e2
steipete
·
2026-05-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -191,11 +191,13 @@ jobs:
|
191 | 191 | working-directory: source |
192 | 192 | env: |
193 | 193 | RELEASE_REF: ${{ inputs.ref }} |
| 194 | +GITHUB_TOKEN: ${{ github.token }} |
194 | 195 | run: | |
195 | 196 | set -euo pipefail |
196 | 197 | SELECTED_SHA="$(git rev-parse HEAD)" |
197 | | - git fetch --no-tags origin '+refs/heads/*:refs/remotes/origin/*' |
198 | | - git fetch --tags origin '+refs/tags/*:refs/tags/*' |
| 198 | + auth_header="$(printf 'x-access-token:%s' "$GITHUB_TOKEN" | base64 | tr -d '\n')" |
| 199 | + git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" fetch --no-tags origin '+refs/heads/*:refs/remotes/origin/*' |
| 200 | + git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" fetch --tags origin '+refs/tags/*:refs/tags/*' |
199 | 201 | |
200 | 202 | if git tag --points-at "${SELECTED_SHA}" | grep -Eq '^v'; then |
201 | 203 | exit 0 |
@@ -238,14 +240,16 @@ jobs:
|
238 | 240 | env: |
239 | 241 | SELECTED_SHA: ${{ steps.ref.outputs.sha }} |
240 | 242 | WORKFLOW_REF: ${{ github.ref }} |
| 243 | +GITHUB_TOKEN: ${{ github.token }} |
241 | 244 | run: | |
242 | 245 | set -euo pipefail |
243 | 246 | if [[ ! "${WORKFLOW_REF}" =~ ^refs/heads/tideclaw/alpha/[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{4}Z$ ]]; then |
244 | 247 | echo "Tideclaw alpha release checks must run from tideclaw/alpha/YYYY-MM-DD-HHMMZ." >&2 |
245 | 248 | exit 1 |
246 | 249 | fi |
247 | 250 | alpha_branch="${WORKFLOW_REF#refs/heads/}" |
248 | | - git fetch --no-tags origin "+refs/heads/${alpha_branch}:refs/remotes/origin/${alpha_branch}" |
| 251 | + auth_header="$(printf 'x-access-token:%s' "$GITHUB_TOKEN" | base64 | tr -d '\n')" |
| 252 | + git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" fetch --no-tags origin "+refs/heads/${alpha_branch}:refs/remotes/origin/${alpha_branch}" |
249 | 253 | if ! git merge-base --is-ancestor "${SELECTED_SHA}" "refs/remotes/origin/${alpha_branch}"; then |
250 | 254 | echo "Alpha release target ${SELECTED_SHA} must be reachable from ${alpha_branch}." >&2 |
251 | 255 | exit 1 |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。