fix: use SSH mode to install cmd agent + node
Install CMD Agent + Node.js on New Server (via SSH) / install (push) Successful in 9s
Downgrade New Runners to v0.2.6 / downgrade (push) Successful in 23s
Check New Server Env / check (push) Failing after 13m26s

This commit is contained in:
2026-07-13 18:38:15 +08:00
parent 72bfd4236e
commit 40180ce6cc
+10 -17
View File
@@ -1,31 +1,24 @@
name: Install CMD Agent + Node.js on New Server
name: Install CMD Agent + Node.js on New Server (via SSH)
on:
workflow_dispatch:
push:
branches:
- ops/downgrade-runners
paths:
- '.gitea/workflows/install-cmd-agent.yml'
- 'scripts/install_cmd_agent.py'
jobs:
install:
runs-on: saas
steps:
- name: Download code
- name: Install CMD Agent + Node.js via SSH
shell: sh
run: |
set -eu
archive_url="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
mkdir -p repo
curl -sL -H "Authorization: token ${GITHUB_TOKEN}" -o /tmp/repo.tar.gz "$archive_url"
tar -xzf /tmp/repo.tar.gz --strip-components=1 -C repo
rm -f /tmp/repo.tar.gz
cd repo
echo "代码下载完成,文件列表:"
ls scripts/ | head -20
- name: Install CMD Agent + Node.js
shell: sh
run: |
set -eu
cd repo
python3 scripts/install_cmd_agent.py
# 下载脚本
curl -sL -H "Authorization: token ${GITHUB_TOKEN}" \
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/contents/scripts/install_cmd_agent.py?ref=ops/downgrade-runners" \
| python3 -c "import json,sys,base64; d=json.load(sys.stdin); open('/tmp/install.py','w').write(base64.b64decode(d['content']).decode())"
python3 /tmp/install.py