chore: fix yaml syntax and add build-only
Add Runner Labels / Label Runners 4 (push) Successful in 0s
Add Runner Labels / Label Runners 7 (push) Successful in 0s
Add Runner Labels / Label Runners 8 (push) Successful in 0s
Add Runner Labels / Label Runners 10 (push) Successful in 0s
Add Runner Labels / Label Runners 6 (push) Successful in 0s
CMD Agent probe / probe (push) Failing after 0s
Get CMD Agent tokens / get-token (push) Failing after 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
Fast add build-only / add (push) Failing after 11m32s
Probe 8443 cmd agent / probe (push) Failing after 11m33s
CMD Agent old server / probe (push) Failing after 11m33s
Add Runner Labels / Label Runners 9 (push) Failing after 11m34s
Add Runner Labels / Label Runners 5 (push) Failing after 11m35s
Add Runner Labels / Label Runners 3 (push) Failing after 11m35s
Add Runner Labels / Label Runners 2 (push) Failing after 11m36s
Add Runner Labels / Label Runners 1 (push) Failing after 11m36s

This commit is contained in:
2026-07-14 14:12:40 +08:00
parent ef3d035568
commit c02a0e9ddb
+28 -16
View File
@@ -4,19 +4,31 @@ jobs:
add:
runs-on: [host, ci-check]
steps:
- run: |
for i in 1 2 3 4 5 6; do
python3 -c "
import json
f='/opt/act-runner/runner-$i/.runner'
with open(f) as fh: d=json.load(fh)
if 'build-only:host' not in d['labels']:
d['labels'].append('build-only:host')
with open(f,'w') as fh: json.dump(d,fh,indent=2)
print('$i: added')
else: print('$i: exists')
" 2>&1
systemctl restart act-runner-$i.service 2>&1 | head -1
done
sleep 12
echo "done on $(hostname)"
- name: add build-only label
run: |
python3 << 'PYEOF'
import json, os, subprocess
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')
continue
with open(f) as fh:
data = json.load(fh)
labels = data.get('labels', [])
if 'build-only:host' not in labels:
labels.append('build-only:host')
data['labels'] = labels
with open(f, 'w') as fh:
json.dump(data, fh, indent=2)
print(f'runner-{i}: ADDED')
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)
print('DONE')
PYEOF
echo "Script exit code: $?"