-
Notifications
You must be signed in to change notification settings - Fork 16
78 lines (71 loc) · 3.35 KB
/
_debug_self-hosted-arm.yaml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: 0xf (Self-Hosted) ➼ Debugger (arm)
#Runner: https://github.com/Azathothas/Toolpacks/settings/actions/runners
on:
workflow_dispatch:
env:
DEBIAN_FRONTEND: "noninteractive"
GITHUB_TOKEN: "${{ secrets.TOOLPACKS }}"
RCLONE_CF_R2_PUB: "${{ secrets.RCLONE_CF_R2_PUB }}"
THOST: "gh-runner-self-arm64"
TUSER: "runner"
jobs:
connect:
runs-on: arm64x-gcp-4x-16GB-120GB
#Default Timeout= 6 Hr (360 Mins) : https://nesin.io/blog/github-action-timeout
#Docs: https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration
#It's best to cause this timeout from your own side (Low to No chance of GH Disabling your repo) rather than gh (High Chance of them disabling your repo)
timeout-minutes: 350
permissions:
contents: write
steps:
- name: Setup Tailscale
run: |
# Presets
set +x ; set +e
export USER="${{ env.TUSER }}"
#--------------#
sudo curl -qfSL "https://bin.ajam.dev/x86_64_Linux/tailscale" -o "/usr/local/bin/tailscale"
sudo curl -qfSL "https://bin.ajam.dev/x86_64_Linux/tailscaled" -o "/usr/local/bin/tailscaled"
sudo chmod +xwr /usr/local/bin/tailscale*
sudo tailscaled --tun=userspace-networking --socks5-server=localhost:9025 --outbound-http-proxy-listen=localhost:9025 >/dev/null 2>&1 &
sudo tailscale up --ssh --hostname="${{ env.THOST }}" --authkey="${{ secrets.TSKEY }}"
sudo tailscale status --peers=false
SSH_IP="$(sudo tailscale ip -4 | tr -d '\n')" && export SSH_IP="$SSH_IP"
TS_DNS="$(sudo tailscale status --json | jq -r '.Self.DNSName' | sed 's/\.$//')" && export TS_DNS="$TS_DNS"
export GREEN='\033[32m' ; export BLUE='\033[34m' ; export YELLOW='\033[33m' ; export PURPLE='\033[35m' ; export VIOLET='\033[0;35m' ; export NC='\033[0m'
echo -e "${GREEN}SSH: ${YELLOW}ssh "$USER@$SSH_IP" -o "StrictHostKeyChecking=no${NC}"\n ${YELLOW}ssh "$USER@$TS_DNS" -o "StrictHostKeyChecking=no${NC}""
echo -e "\n [+] ${GREEN}openvscode-server: ${BLUE}http://$TS_DNS:8080${NC}\n"
continue-on-error: true
#Replace with any extra things you want to do
- name: Run Custom Cmd
run: |
echo "Hellow"
sudo apt-get install apt-utils software-properties-common -y
continue-on-error: true
#Replace with any extra things you want to do
- name: Set TZ to (Asia/Kathmandu)
run: |
echo "Hellow"
sudo apt-get update -y && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
sudo ln -fs "/usr/share/zoneinfo/Asia/Kathmandu" "/etc/localtime"
sudo dpkg-reconfigure --frontend noninteractive tzdata
sudo apt-get update -y
continue-on-error: true
- name: Get latest Python
uses: deadsnakes/[email protected]
with:
python-version: "3.13"
continue-on-error: true
- name: Test latest Python
run: |
# Presets
set +x ; set +e
#--------------#
python --version ; pip --version
continue-on-error: true
#This keeps GH Actions hypnotized until timeout
- name: Breakpoint || Sleep ∞
run: |
while :; do sleep 1; done
#sleep 340m
continue-on-error: true