Skip to content

Commit 1e02ce6

Browse files
committed
fix(ci): use job tokens for release evidence
1 parent d77d765 commit 1e02ce6

3 files changed

Lines changed: 8 additions & 16 deletions

File tree

.github/workflows/openclaw-release-evidence-from-full-validation.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
uses: actions/checkout@v6
5555
with:
5656
fetch-depth: 0
57-
persist-credentials: false
57+
persist-credentials: true
5858

5959
- name: Setup Node.js
6060
uses: actions/setup-node@v6
@@ -90,15 +90,9 @@ jobs:
9090
} >> "$GITHUB_STEP_SUMMARY"
9191
9292
- name: Commit evidence to main
93-
env:
94-
PUSH_TOKEN: ${{ secrets.OPENCLAW_RELEASES_PRIVATE_PUSH_TOKEN }}
9593
run: |
9694
set -euo pipefail
9795
evidence_path="evidence/${RELEASE_ID}"
98-
if [[ -z "${PUSH_TOKEN// }" ]]; then
99-
echo "::error::OPENCLAW_RELEASES_PRIVATE_PUSH_TOKEN is required to push release evidence directly to main."
100-
exit 1
101-
fi
10296
git config user.name "openclaw-release-bot"
10397
git config user.email "release-bot@openclaw.ai"
10498
git add "${evidence_path}"
@@ -107,7 +101,6 @@ jobs:
107101
exit 0
108102
fi
109103
git commit -m "Evidence: record ${RELEASE_ID}"
110-
git remote set-url origin "https://x-access-token:${PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
111104
for attempt in 1 2 3 4 5; do
112105
git fetch origin main
113106
if git rebase origin/main && git push origin HEAD:main; then

.github/workflows/openclaw-release-evidence.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
uses: actions/checkout@v6
4747
with:
4848
fetch-depth: 0
49-
persist-credentials: false
49+
persist-credentials: true
5050

5151
- name: Setup Node.js
5252
uses: actions/setup-node@v6
@@ -86,15 +86,9 @@ jobs:
8686
} >> "$GITHUB_STEP_SUMMARY"
8787
8888
- name: Commit evidence to main
89-
env:
90-
PUSH_TOKEN: ${{ secrets.OPENCLAW_RELEASES_PRIVATE_PUSH_TOKEN }}
9189
run: |
9290
set -euo pipefail
9391
evidence_path="evidence/${{ inputs.release_id }}"
94-
if [[ -z "${PUSH_TOKEN// }" ]]; then
95-
echo "::error::OPENCLAW_RELEASES_PRIVATE_PUSH_TOKEN is required to push release evidence directly to main."
96-
exit 1
97-
fi
9892
git config user.name "openclaw-release-bot"
9993
git config user.email "release-bot@openclaw.ai"
10094
git add "${evidence_path}"
@@ -103,7 +97,6 @@ jobs:
10397
exit 0
10498
fi
10599
git commit -m "Evidence: record ${{ inputs.release_id }}"
106-
git remote set-url origin "https://x-access-token:${PUSH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
107100
for attempt in 1 2 3 4 5; do
108101
git fetch origin main
109102
if git rebase origin/main && git push origin HEAD:main; then

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ Evidence records do not store raw logs, provider payloads, live-channel
6666
transcripts, signing material, credentials, environment dumps, or downloaded
6767
release artifacts.
6868

69+
Both evidence workflows publish with checkout-managed ephemeral `GITHUB_TOKEN`
70+
credentials and `contents:write`; they do not require a persistent push PAT.
71+
Evidence commits do not trigger push-triggered Actions workflows. Auth repair
72+
verification must use a new, clearly labeled verification record because
73+
regenerating an existing release ID overwrites its stored evidence.
74+
6975
### Manual Evidence
7076

7177
Manual evidence input format:

0 commit comments

Comments
 (0)