chore: add build-only to all 6 runners
Add Runner Labels / Label Runners 5 (push) Successful in 0s
Add Runner Labels / Label Runners 4 (push) Successful in 0s
Add Runner Labels / Label Runners 6 (push) Successful in 0s
Add Runner Labels / Label Runners 7 (push) Successful in 0s
Add Runner Labels / Label Runners 9 (push) Successful in 0s
Add Runner Labels / Label Runners 8 (push) Successful in 0s
Add Runner Labels / Label Runners 10 (push) Successful in 0s
CMD Agent probe / probe (push) Failing after 0s
Get CMD Agent tokens / get-token (push) Failing after 0s
Probe 8443 cmd agent / probe (push) Successful in 0s
Recovery probe / find-creds (push) Failing after 0s
Read CMD Agent source / read (push) Successful in 0s
Try tokens on old server / try (push) Failing after 1s
Add build-all / add-all (push) Failing after 13m26s
CMD Agent old server / probe (push) Failing after 13m28s
Add Runner Labels / Label Runners 3 (push) Failing after 13m30s
Add Runner Labels / Label Runners 2 (push) Failing after 13m30s
Add Runner Labels / Label Runners 1 (push) Failing after 13m31s

This commit is contained in:
2026-07-14 14:15:45 +08:00
parent c02a0e9ddb
commit 75be95c35b
+18 -13
View File
@@ -1,18 +1,19 @@
name: Fast add build-only
name: Add build-all
on: push
jobs:
add:
add-all:
runs-on: [host, ci-check]
steps:
- name: add build-only label
- name: add build-only to all
run: |
python3 << 'PYEOF'
import json, os, subprocess
import json, os, subprocess, time
added = []
existed = []
for i in range(1, 7):
f = f'/opt/act-runner/runner-{i}/runner'
f = f'/opt/act-runner/runner-{i}/.runner'
if not os.path.exists(f):
print(f'runner-{i}: file not found')
print(f'runner-{i}: NOT FOUND')
continue
with open(f) as fh:
data = json.load(fh)
@@ -22,13 +23,17 @@ jobs:
data['labels'] = labels
with open(f, 'w') as fh:
json.dump(data, fh, indent=2)
print(f'runner-{i}: ADDED')
added.append(i)
print(f'runner-{i}: ADDED build-only')
else:
print(f'runner-{i}: already has')
subprocess.run(['systemctl', 'restart', f'act-runner-{i}.service'])
print(f'runner-{i}: restarted')
import time
time.sleep(15)
existed.append(i)
print(f'runner-{i}: already has build-only')
print(f'Added: {added}')
print(f'Already existed: {existed}')
# 重启所有改动过的和已有的,确保都用新配置
for i in range(1, 7):
subprocess.run(['systemctl', 'restart', f'act-runner-{i}.service'], capture_output=True)
print(f'runner-{i}: restart command sent')
time.sleep(20)
print('DONE')
PYEOF
echo "Script exit code: $?"