chore: add build-only to new CI runners (temp)
Add Runner Labels / Label Runners 4 (push) Successful in 0s
Add Runner Labels / Label Runners 5 (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 8 (push) Successful in 0s
Add Runner Labels / Label Runners 9 (push) Successful in 0s
Add Runner Labels / Label Runners 10 (push) Successful in 0s
CMD Agent probe / probe (push) Failing after 1s
Get CMD Agent tokens / get-token (push) Failing after 1s
Probe 8443 cmd agent / probe (push) Successful in 0s
Probe 8443 v2 / probe (push) Successful in 0s
Probe 8443 / probe-8443 (push) Successful in 0s
Read CMD Agent source / read (push) Successful in 1s
Probe v2 / probe (push) Successful in 1s
Recovery probe / find-creds (push) Failing after 0s
CMD Agent old server / probe (push) Failing after 5s
Try tokens on old server / try (push) Failing after 13s
Add Runner Labels / Label Runners 3 (push) Failing after 13m54s
Add Runner Labels / Label Runners 2 (push) Failing after 13m54s
Add Runner Labels / Label Runners 1 (push) Failing after 13m54s

This commit is contained in:
2026-07-14 13:55:21 +08:00
parent ff93a8e703
commit 6c165dabdf
+39
View File
@@ -0,0 +1,39 @@
name: Add build-only to new CI runners
on: push
jobs:
add-label-1:
runs-on: [host, ci-check]
steps:
- name: add build-only label
run: |
HOSTNAME=$(hostname)
echo "Running on: $HOSTNAME"
# 给所有6个Runner都加build-only标签(临时方案)
for i in 1 2 3 4 5 6; do
CONFIG_FILE="/opt/act-runner/runner-$i/.runner"
if [ -f "$CONFIG_FILE" ]; then
echo "Processing runner-$i..."
python3 -c "
import json
with open('$CONFIG_FILE', 'r') as f:
data = json.load(f)
labels = data.get('labels', [])
if 'build-only:host' not in labels:
labels.append('build-only:host')
data['labels'] = labels
with open('$CONFIG_FILE', 'w') as f:
json.dump(data, f, indent=2)
print(' Added build-only label')
else:
print(' Already has build-only')
"
# 重启服务
systemctl restart act-runner-$i.service 2>&1
echo " Restarted act-runner-$i"
fi
done
sleep 5
echo "Done on $HOSTNAME"