From 66a0c1cd77e5d1a7aff27971a5b730df9c00585c Mon Sep 17 00:00:00 2001 From: Yann Kervran Date: Fri, 19 Apr 2024 10:28:19 +0200 Subject: [PATCH] test --- .forgejo/workflows/demo.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/demo.yaml b/.forgejo/workflows/demo.yaml index 0742680..e6441db 100644 --- a/.forgejo/workflows/demo.yaml +++ b/.forgejo/workflows/demo.yaml @@ -29,8 +29,14 @@ jobs: # path: /workspace/YannK/Actions_tests/Actions_tests/site secret_test: + name: SSH connection tests runs-on: bookworm steps: - - name: Test de secret + - name: Install SSH key to proper place run: | - echo {{ secrets.CD_SECRET_NUMBER_1 }} \ No newline at end of file + install -m 600 -D /dev/null ~/.ssh/id_rsa + echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts + - name: Connect and check + run: | + ssh -i ~/.ssh/id_rsa -p ${{ secrets.SSH_PORT }} ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "ls -al" \ No newline at end of file