From d2c6c55f2bc31976e3c5c9c4824a05013391d544 Mon Sep 17 00:00:00 2001 From: "B. Blechschmidt" Date: Thu, 30 May 2024 23:43:52 +0200 Subject: [PATCH] Add SSH support for root user to pipeline --- .github/workflows/run-tests.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index a266b67..084d2f3 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -25,7 +25,17 @@ jobs: - name: Prepare environment env: SSH_KEY: ${{ secrets.SSH_KEY }} - run: mkdir -p ~/.ssh && echo "$SSH_KEY" >> ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa && sudo systemctl stop systemd-resolved && sudo bash -c 'rm /etc/resolv.conf; echo "nameserver 1.1.1.1" > /etc/resolv.conf' && sudo iptables -P FORWARD ACCEPT && sudo ip6tables -P FORWARD ACCEPT + run: | + mkdir -p ~/.ssh + echo "$SSH_KEY" > ~/.ssh/id_rsa + mkdir -p /root/.ssh + sudo cp ~/.ssh/id_rsa /root/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + sudo systemctl stop systemd-resolved + sudo bash -c 'rm /etc/resolv.conf + echo "nameserver 1.1.1.1" > /etc/resolv.conf' + sudo iptables -P FORWARD ACCEPT + sudo ip6tables -P FORWARD ACCEPT #- name: Setup upterm session # uses: lhotari/action-upterm@v1 - name: Populate .env