ci(qa): trust release branch heads · openclaw/openclaw@248b1b4
steipete
·
2026-04-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -89,6 +89,12 @@ jobs:
|
89 | 89 | trusted_reason="main-ancestor" |
90 | 90 | elif git tag --points-at "$selected_sha" | grep -Eq '^v'; then |
91 | 91 | trusted_reason="release-tag" |
| 92 | + elif [[ "$INPUT_REF" =~ ^release/[0-9]{4}\.[0-9]+\.[0-9]+$ ]]; then |
| 93 | + git fetch --no-tags origin "+refs/heads/${INPUT_REF}:refs/remotes/origin/${INPUT_REF}" |
| 94 | + release_branch_sha="$(git rev-parse "refs/remotes/origin/${INPUT_REF}")" |
| 95 | + if [[ "$selected_sha" == "$release_branch_sha" ]]; then |
| 96 | + trusted_reason="release-branch-head" |
| 97 | + fi |
92 | 98 | else |
93 | 99 | pr_head_count="$( |
94 | 100 | gh api \ |
@@ -103,7 +109,7 @@ jobs:
|
103 | 109 | |
104 | 110 | if [[ -z "$trusted_reason" ]]; then |
105 | 111 | echo "Ref '${INPUT_REF}' resolved to $selected_sha, which is not trusted for this secret-bearing QA run." >&2 |
106 | | - echo "Allowed refs must be on main, point to a release tag, or match an open PR head in ${GITHUB_REPOSITORY}." >&2 |
| 112 | + echo "Allowed refs must be on main, point to a release tag, match a release branch head, or match an open PR head in ${GITHUB_REPOSITORY}." >&2 |
107 | 113 | exit 1 |
108 | 114 | fi |
109 | 115 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。