-
Notifications
You must be signed in to change notification settings - Fork 113
40 lines (34 loc) · 1.27 KB
/
remote_build_server.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: remote_build_server
on:
push:
paths:
- tools/create_remote_build_server/**
- .github/workflows/remote_build_server.yml
permissions: read-all
jobs:
remote_build_server-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
submodules: true
- name: Run tests
run: |
sudo -s -- << \EOF
set -euxo pipefail
apt update &> /dev/null
apt install -y -qq ansible openssh-server python3-jmespath python3-apt sudo > /dev/null
systemctl start ssh
# Create ssh key and add it to authorized keys
install -m 0700 -d $HOME/.ssh && ssh-keygen -t ed25519 -f $HOME/.ssh/id_ed25519 -q -N ""
cp $HOME/.ssh/id_ed25519.pub $HOME/.ssh/authorized_keys
chmod 0600 $HOME/.ssh/authorized_keys
# Run Ansible
export REMOTE_USER="root"
export REMOTE_IP="localhost"
export ANSIBLE_HOST_KEY_CHECKING=False
export ANSIBLE_SKIP_TAGS="actions-runner_registration,actions-runner_installation"
cd tools/create_remote_build_server
ansible-galaxy collection install -v -r requirements.yml
./build_remote_ssh_ubuntu.sh
EOF