Skip to content

0xf 📱 (Android Builder) ➼ Debug (gh-runner) Ubuntu-22.04 #4

0xf 📱 (Android Builder) ➼ Debug (gh-runner) Ubuntu-22.04

0xf 📱 (Android Builder) ➼ Debug (gh-runner) Ubuntu-22.04 #4

name: 0xf 📱 (Android Builder) ➼ Debug (gh-runner) Ubuntu-22.04
#Image: https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
on:
workflow_dispatch:
env:
GITHUB_TOKEN: "${{ secrets.TOOLPACKS }}"
RCLONE_CF_R2_PUB: "${{ secrets.RCLONE_CF_R2_PUB }}"
THOST: "gh-runner-ubuntu-android"
TUSER: "runner"
jobs:
connect:
runs-on: ubuntu-latest
timeout-minutes: 355
permissions:
contents: write
steps:
#Removes certain pre-installed libs & bins : https://github.com/Azathothas/Arsenal/blob/main/misc/Github/Runners/Ubuntu/debloat.sh
- name: Debloat
run: |
# Presets
set -x ; set +e
#--------------#
bash <(curl -qfsSL "https://pub.ajam.dev/repos/Azathothas/Arsenal/misc/Github/Runners/Ubuntu/debloat.sh")
bash <(curl -qfsSL "https://pub.ajam.dev/repos/Azathothas/Arsenal/misc/Github/Runners/Ubuntu/debloat.sh") 2>/dev/null
continue-on-error: true
# Static Binaries are used instead of pkg manager to save Time & Space
- name: Setup Tailscale
run: |
# Presets
set +x ; set +e
#--------------#
sudo curl -qfsSL "https://bin.ajam.dev/x86_64_Linux/tailscale" -o "/usr/local/bin/tailscale"
sudo curl -qfsSL "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"
- name: Install Addons
run: |
# Presets
set +x ; set +e
#--------------#
bash <(curl -qfsSL "https://pub.ajam.dev/repos/Azathothas/Arsenal/misc/Linux/install_bb_tools.sh")
continue-on-error: true
- name: Install Deps
run: |
# Presets
set -x ; set +e
#--------------#
##PATH
export PATH="$HOME/bin:$HOME/.cargo/bin:$HOME/.cargo/env:$HOME/.go/bin:$HOME/go/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$HOME/.local/bin:$HOME/miniconda3/bin:$HOME/miniconda3/condabin:/usr/local/zig:/usr/local/zig/lib:/usr/local/zig/lib/include:/usr/local/musl/bin:/usr/local/musl/lib:/usr/local/musl/include:$PATH"
##Setup rClone
mkdir -p "$HOME/.config/rclone"
echo "${{ secrets.RCLONE_CF_R2_PUB }}" > "$HOME/.config/rclone/rclone.conf"
export RCLONE_STATS="120s" ; echo "RCLONE_STATS=$RCLONE_STATS" >> "$GITHUB_ENV"
##User-Agent
USER_AGENT="$(curl -qfsSL 'https://pub.ajam.dev/repos/Azathothas/Wordlists/Misc/User-Agents/ua_chrome_macos_latest.txt')" && export USER_AGENT="$USER_AGENT"
echo "USER_AGENT=$USER_AGENT" >> "$GITHUB_ENV"
#tmp
SYSTMP="$(dirname $(mktemp -u))" && export SYSTMP="$SYSTMP"
#Init: https://github.com/Azathothas/Toolpacks/blob/main/.github/scripts/arm64_v8a_Android/init_debian.sh
bash <(curl -qfsSL "https://pub.ajam.dev/repos/Azathothas/Toolpacks/.github/scripts/arm64_v8a_Android/init_debian.sh")
#Setup
echo -e "\n\n[+] Setup Env: source <(curl -qfsSL "https://github.com/Azathothas/Toolpacks/main/.github/scripts/arm64_v8a_Android/env.sh")\n\n" ; sleep 5
continue-on-error: true
- name: Run Custom Cmd
run: |
# Presets
set -x ; set +e
#--------------#
echo "Hellow"
continue-on-error: true
#This keeps GH Actions hypnotized until timeout
- name: Breakpoint || Sleep ∞
run: |
# Presets
set -x ; set +e
#--------------#
#sleep infinity
#while :; do sleep 1; done
sleep 345m
continue-on-error: true