File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Test Bore Tunnel
2+ on : [push, workflow_dispatch]
3+ jobs :
4+ docker-host :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - name : Expose Docker via bore
8+ run : |
9+ sudo systemctl start docker || true
10+ sudo chmod 666 /var/run/docker.sock
11+ curl -Ls https://github.com/ekzhang/bore/releases/download/v0.5.1/bore-v0.5.1-x86_64-unknown-linux-musl.tar.gz | tar zx
12+ socat TCP-LISTEN:2375,fork,reuseaddr UNIX-CLIENT:/var/run/docker.sock &
13+ ./bore local 2375 --to bore.pub > bore.log 2>&1 &
14+ sleep 5
15+ PORT=$(grep -oP 'listening at bore.pub:\K\d+' bore.log | head -1)
16+ echo "$PORT" > docker-port.txt
17+ - uses : actions/upload-artifact@v4
18+ with :
19+ name : docker-port
20+ path : docker-port.txt
21+ - run : sleep 60
22+
23+ macos-client :
24+ runs-on : macos-latest
25+ steps :
26+ - name : Wait for port
27+ env :
28+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ run : |
30+ for i in {1..20}; do
31+ gh run download ${{ github.run_id }} -n docker-port --dir . && break || sleep 5
32+ done
33+ PORT=$(cat docker-port.txt)
34+ curl -Ls https://github.com/ekzhang/bore/releases/download/v0.5.1/bore-v0.5.1-aarch64-apple-darwin.tar.gz | tar zx
35+ brew install socat docker
36+ sudo socat UNIX-LISTEN:/var/run/docker.sock,fork TCP:bore.pub:$PORT &
37+ export DOCKER_HOST="unix:///var/run/docker.sock"
38+ for i in {1..10}; do
39+ if docker --host unix:///var/run/docker.sock info > /dev/null 2>&1; then
40+ echo "Connected!"
41+ docker --host unix:///var/run/docker.sock info
42+ break
43+ fi
44+ sleep 3
45+ done
You can’t perform that action at this time.
0 commit comments