1
0
mirror of https://github.com/pooneyy/1Panel-Appstore.git synced 2026-03-17 23:51:03 +08:00

ci(sync): add SSH port configuration support

- rename sync job to ssh-sync for clarity
- add SSH_PORT variable support for ssh-keyscan command
- implement conditional logic for SSH port configuration
- update known_hosts setting to support non-standard SSH ports
This commit is contained in:
pooneyy 2026-03-01 22:18:46 +08:00
parent c59464a076
commit f2c11a2a5b
No known key found for this signature in database

View File

@ -16,7 +16,7 @@ permissions:
contents: read
jobs:
sync:
ssh-sync:
name: 同步到 ${{ matrix.remote.name }}
runs-on: ubuntu-latest
strategy:
@ -51,7 +51,13 @@ jobs:
- name: 添加目标主机的公钥
run: |
mkdir -p ~/.ssh
ssh-keyscan ${{ matrix.remote.ssh-host }} >> ~/.ssh/known_hosts
SSH_HOST=${{ matrix.remote.ssh-host }}
SSH_PORT=${{ matrix.remote.ssh-port }}
if [ -n "$SSH_PORT" ]; then
ssh-keyscan -p $SSH_PORT $SSH_HOST >> ~/.ssh/known_hosts
else
ssh-keyscan $SSH_HOST >> ~/.ssh/known_hosts
fi
- name: 配置本地仓库
run: |