Skip to content

Commit 9130cfb

Browse files
committed
Aligns
1 parent 3c2b833 commit 9130cfb

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/generate-runners-status.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
Check:
1616

1717
name: "Check permissions"
18-
runs-on: "ubuntu-24.04"
18+
runs-on: "ubuntu-22.04"
1919
steps:
2020

2121
- name: "Check permissions"
@@ -34,9 +34,20 @@ jobs:
3434
- name: "Install dependencies: jq"
3535
uses: awalsh128/cache-apt-pkgs-action@latest
3636
with:
37-
packages: jq
37+
packages: jq resolvconf
3838
version: 1.0
3939

40+
- name: "Test connection"
41+
run: |
42+
43+
sudo apt-get -y install wireguard-tools
44+
echo "${{ secrets.WIREGUARD_LAB }}" > wg0.conf
45+
sudo chmod 600 wg0.conf
46+
echo "setting config"
47+
sudo systemctl enable [email protected]
48+
sudo wg-quick up ./wg0.conf
49+
#ping 10.0.60.8 -c 5
50+
4051
- name: "Get runners from ORG"
4152
env:
4253
GH_TOKEN: ${{ secrets.RUNNERS }}
@@ -52,7 +63,7 @@ jobs:
5263
done
5364
5465
echo "<table>" >> $GITHUB_STEP_SUMMARY
55-
echo "<tr><td>Name</td><td>CPU cores</td><td>Memory GB</td><td>Storage GB</td><td alignt=right>Runners</td></tr>" >> $GITHUB_STEP_SUMMARY
66+
echo "<tr><td>Name</td><td alignt=right>CPU cores</td><td alignt=right>Memory GB</td><td alignt=right>Storage GB</td><td alignt=right>Runners</td></tr>" >> $GITHUB_STEP_SUMMARY
5667
SERVERS=$(curl -s -H "Authorization: Token ${{ secrets.NETBOX_TOKEN }}" -H "Accept: application/json; indent=4" \
5768
"${{ secrets.NETBOX_API }}/virtualization/virtual-machines/?limit=500&name__empty=false&role=userlevel-runner&status=active" \
5869
| jq -r '.results[] | .id')
@@ -66,7 +77,7 @@ jobs:
6677
echo -e "<tr><td colspan=5>" >> $GITHUB_STEP_SUMMARY
6778
for runner in $(seq -f "%02g" 1 $RUNNERS | sed -e "s/.*/$NAME-&/"); do
6879
INFO=$(cat runners.json | jq -r '.runners[] | select(.name | startswith("'$runner'"))' | jq -r '.name,.status,.busy' | xargs -n3 -d'\n' | sort | uniq)
69-
[[ -n $INFO ]] && echo ":+1:" >> $GITHUB_STEP_SUMMARY || echo ":exclamation: <small>($runner)</small>" >> $GITHUB_STEP_SUMMARY
80+
[[ -n $INFO || ${NAME} == github ]] && echo ":+1:" >> $GITHUB_STEP_SUMMARY || echo ":exclamation: <small>($runner)</small>" >> $GITHUB_STEP_SUMMARY
7081
done
7182
echo -e "</td></tr>" >> $GITHUB_STEP_SUMMARY
7283
done

0 commit comments

Comments
 (0)