From 0034eac25289adb213efa354f07fd7d2239336c9 Mon Sep 17 00:00:00 2001 From: Dinis Cruz Date: Thu, 30 May 2024 20:22:56 +0100 Subject: [PATCH] added some more docker commands --- .github/workflows/run-tests-with-ssh.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests-with-ssh.yml b/.github/workflows/run-tests-with-ssh.yml index e32a98b5..28148754 100644 --- a/.github/workflows/run-tests-with-ssh.yml +++ b/.github/workflows/run-tests-with-ssh.yml @@ -9,12 +9,11 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Generate SSH key id: ssh-key run: | @@ -24,17 +23,23 @@ jobs: - name: Start Docker container run: | - docker run -d -p 22222:22 --name test_container -e AUTHORIZED_KEYS="$(cat /tmp/ssh_key.pub)" --platform linux/arm64 diniscruz/python_with_ssh + docker run -d -p 22222:22 --name test_container -e AUTHORIZED_KEYS="${{ steps.ssh-key.outputs.public_key }}" --platform linux/arm64 diniscruz/python_with_ssh - name: Wait for Docker container to be ready run: | + ls -la /tmp docker ps sleep 10 docker ps + docker logs test_container - name: Run a simple SSH command + run: | + ls -la /tmp + chmod 600 /tmp/ssh_key ssh -o StrictHostKeyChecking=no -i /tmp/ssh_key root@localhost -p 22222 echo "SSH connection successful" + # - name: Run tests # run: |