Skip to content

Commit

Permalink
Add SSH support for root user to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
blechschmidt committed May 30, 2024
1 parent 11a9d5d commit d2c6c55
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d2c6c55

Please sign in to comment.