From 7d3ffb4d101d77a54c6027932518050cb4c523e8 Mon Sep 17 00:00:00 2001 From: Tristiisch Date: Mon, 21 Oct 2024 02:07:00 +0200 Subject: [PATCH] a --- .github/workflows/main.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bdf1c3c..d32894b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,12 +27,13 @@ jobs: image: ghcr.io/tristiisch/docker_throw_ssh:latest ports: - 2222:22 - # --privileged - options: > - --cap-add=NET_ADMIN - --cap-add=NET_RAW - --tmpfs /run - --tmpfs /run/lock + options: > + --privileged + --tty + --cap-add=NET_ADMIN + --cap-add=NET_RAW + --tmpfs /run + --tmpfs /run/lock --tmpfs /tmp volumes: - /sys/fs/cgroup:/sys/fs/cgroup @@ -44,12 +45,12 @@ jobs: - name: Wait for SSH server run: | + docker ps -a if [ -n ACT ]; then docker ps -aq -f name=${{ env.CONTAINER_NAME }} | xargs -r docker rm -f sudo apt update &> /dev/null sudo apt install -y netcat &> /dev/null fi - docker ps -a echo "CONTAINER_NAME=$(docker ps --format '{{.Names}}' | head -n 1)" >> $GITHUB_ENV echo "Waiting for SSH server at ${{ env.REMOTE_SSH_HOST }}:${{ env.REMOTE_SSH_PORT }}..." timeout 30 bash -c 'while ! nc -zv ${{ env.REMOTE_SSH_HOST }} ${{ env.REMOTE_SSH_PORT }}; do sleep 1; done'