fix(deploy): replace appleboy/ssh-action with sshpass for compatibility

The Docker-based appleboy/ssh-action fails with act runner due to
Alpine compatibility issues. Using direct sshpass commands avoids
Docker-in-Docker problems and works natively with the runner.
This commit is contained in:
2026-01-20 22:47:40 +00:00
parent 6500226c3c
commit 234c8b52cb

View File

@@ -16,18 +16,20 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install sshpass
run: |
apt-get update && apt-get install -y sshpass
- name: Deploy SilverDOCK Container
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ github.event.inputs.target_host }}
username: sysadmin
password: ${{ secrets.SSH_PASSWORD }}
script_stop: true
command_timeout: 10m
script: |
#!/bin/bash
env:
SSHPASS: ${{ secrets.SSHPASSWORD }}
TARGET_HOST: ${{ github.event.inputs.target_host }}
GITEA_TOKEN: ${{ secrets.GITEATOKEN }}
HOSTNAME: ${{ github.event.inputs.hostname }}
run: |
sshpass -e ssh -o StrictHostKeyChecking=no sysadmin@${TARGET_HOST} << 'ENDSSH'
# Login to Gitea container registry
docker login git.silverlabs.uk -u sysadmin -p ${{ secrets.GITEATOKEN }}
docker login git.silverlabs.uk -u sysadmin -p ${GITEA_TOKEN}
# Pull latest SilverDOCK image
docker pull git.silverlabs.uk/silverlabs/silverdock:latest
@@ -42,8 +44,9 @@ jobs:
--restart unless-stopped \
-p 5080:8080 \
-e REPOSITORY_URL=https://git.silverlabs.uk/SilverLABS/privacyfirstwebsite.git \
-e GIT_TOKEN=${{ secrets.GITEATOKEN }} \
-e SILVERDOCK_UI_HOSTNAME=${{ github.event.inputs.hostname }} \
-e GIT_TOKEN=${GITEA_TOKEN} \
-e SILVERDOCK_UI_HOSTNAME=${HOSTNAME} \
-v privacyfirst-keys:/app/keys \
-v privacyfirst-source:/app/source \
git.silverlabs.uk/silverlabs/silverdock:latest
ENDSSH