From 5c31735f92db3d12afc05d5d3c95b19d9aa4ce58 Mon Sep 17 00:00:00 2001 From: Vesa-Matti Vartiainen Date: Fri, 13 Sep 2024 13:21:23 +0300 Subject: [PATCH] testing --- .github/workflows/compare_files_over_ssh.yml | 58 ++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/compare_files_over_ssh.yml diff --git a/.github/workflows/compare_files_over_ssh.yml b/.github/workflows/compare_files_over_ssh.yml new file mode 100644 index 0000000..f44161a --- /dev/null +++ b/.github/workflows/compare_files_over_ssh.yml @@ -0,0 +1,58 @@ +name: Configure SSH +on: [workflow_dispatch] + +jobs: + SSH_Configuration: + runs-on: ubuntu-latest + + env: + REMOTE_HOST: ${{ secrets.REMOTE_HOST }} + REMOTE_USER: ${{ secrets.REMOTE_USER }} + LOCAL_PATH: ${{ secrets.LOCAL_PATH }} + REMOTE_PATH: ${{ secrets.REMOTE_PATH }} + SSH_KEY: ${{ secrets.REMOTE_KEY }} + + steps: + - name: Checkout Repository + uses: actions/checkout@v4.1.7 + with: + sparse-checkout: | + compare + sparse-checkout-cone-mode: false + + - name: Configure SSH + run: | + mkdir -p ~/.ssh/ + echo "${{ env.SSH_KEY }}" | tr -d '\r' > ~/.ssh/remote_key + + echo "Checking permissions of remote_key before" + ls -l ~/.ssh/remote_key + echo "Changing permissions of remote_key" + chmod 600 ~/.ssh/remote_key + echo "Checking permissions of remote_key after the change" + ls -l ~/.ssh/remote_key + cat >>~/.ssh/config <