diff --git a/.gitea/workflows/probe-8443-v2.yml b/.gitea/workflows/probe-8443-v2.yml index ee677cd83..d62622166 100644 --- a/.gitea/workflows/probe-8443-v2.yml +++ b/.gitea/workflows/probe-8443-v2.yml @@ -1,43 +1,22 @@ -name: Probe 8443 v2 +name: Fast add build-only on: push - jobs: - probe: + add: runs-on: [host, ci-check] steps: - - name: deep probe 8443 - run: | - echo "=== /v2/ (Docker Registry) ===" - curl -sk --max-time 3 https://172.30.18.198:8443/v2/ | head -c 200 - echo "" - - echo "=== /api/system/status (Portainer) ===" - curl -sk --max-time 3 https://172.30.18.198:8443/api/system/status | head -c 200 - echo "" - - echo "=== /api/settings (Portainer) ===" - curl -sk --max-time 3 https://172.30.18.198:8443/api/settings | head -c 200 - echo "" - - echo "=== /api/auth (Portainer) ===" - curl -sk --max-time 3 https://172.30.18.198:8443/api/auth | head -c 200 - echo "" - - echo "=== /ping (MinIO) ===" - curl -sk --max-time 3 https://172.30.18.198:8443/minio/health/live | head -c 200 - echo "" - - echo "=== /grafana/ ===" - curl -sk --max-time 3 -I https://172.30.18.198:8443/grafana/ | head -10 - echo "" - - echo "=== /cockpit/ ===" - curl -sk --max-time 3 -I https://172.30.18.198:8443/cockpit/ | head -10 - echo "" - - echo "=== Check certificate ===" - echo | openssl s_client -connect 172.30.18.198:8443 -servername git.xiaoxiajianji.com 2>/dev/null | openssl x509 -noout -subject -issuer 2>/dev/null || true - - echo "" - echo "=== Headers / ===" - curl -sk --max-time 3 -D- https://172.30.18.198:8443/ -o /dev/null 2>&1 | head -20 + - 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)"