From a1435e325a95ee049f92a9aba90bae5ae24b6269 Mon Sep 17 00:00:00 2001 From: holzmaster Date: Mon, 16 Nov 2026 21:42:56 +0100 Subject: [PATCH] Deploy e2e bot via remote Docker daemon instead of server script The runner now talks to the server's Docker daemon via DOCKER_HOST=ssh://, using the compose file from the checkout. Changes to compose.ephemeral.yaml are therefore effective in the PR itself, and the e2e deployment no longer depends on CD having copied .infra to the server first. deploy-ephemeral.sh and the read-file action are not needed anymore. --- .github/workflows/CI.yaml | 59 ++++++++++++++++++++++++++------------ .infra/deploy-ephemeral.sh | 29 ------------------- 2 files changed, 41 insertions(+), 47 deletions(-) delete mode 100755 .infra/deploy-ephemeral.sh diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index d91d7021..0fc71185 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -130,12 +130,6 @@ jobs: run: | envsubst < .github/config.json > config-ephemeral.json - - name: Read config.json - id: config - uses: juliangruber/read-file-action@v1 - with: - path: ./config-ephemeral.json - - name: Build args id: args env: @@ -149,22 +143,51 @@ jobs: echo "args=$args" >> "$GITHUB_OUTPUT" + - name: Set up SSH + env: + SSH_HOST: ${{ secrets.SSH_HOST }} + SSH_PORT: ${{ secrets.SSH_PORT }} + SSH_USERNAME: ${{ secrets.SSH_USERNAME }} + SSH_KEY: ${{ secrets.SSH_KEY }} + run: | + install -m 700 -d ~/.ssh + install -m 600 /dev/null ~/.ssh/deploy_key + echo "$SSH_KEY" > ~/.ssh/deploy_key + ssh-keyscan -p "$SSH_PORT" "$SSH_HOST" >> ~/.ssh/known_hosts + + # docker opens a new SSH connection for every API call, so reuse a single one + cat >> ~/.ssh/config <