File tree 2 files changed +65
-1
lines changed
2 files changed +65
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Build Dev
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - dev
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ concurrency :
12
+ group : ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
13
+ cancel-in-progress : true
14
+
15
+ jobs :
16
+ build-alpine :
17
+ runs-on : self-hosted
18
+ container :
19
+ image : alpine:latest
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+ - name : Install dependencies
23
+ run : |
24
+ apk update
25
+ apk add --no-cache \
26
+ bash \
27
+ curl \
28
+ git \
29
+ go~=1.23 \
30
+ gcc \
31
+ musl-dev \
32
+ nodejs \
33
+ docker
34
+ curl -fsSL https://bun.sh/install | bash
35
+ mv /root/.bun/bin/bun /usr/local/bin/bun
36
+
37
+ - name : Verify installations
38
+ run : |
39
+ echo "=== Go Version ==="
40
+ go version
41
+ echo "\n=== Go Env ==="
42
+ go env
43
+ echo "\n=== Bun Version ==="
44
+ bun --version
45
+
46
+ - name : build-frontend
47
+ run : |
48
+ git clone https://github.com/socoldkiller/headscale-ui.git
49
+ cd headscale-ui
50
+ git checkout dev
51
+ bun install
52
+ bun run build
53
+
54
+ - name : Build
55
+ run : |
56
+ cp -r headscale-ui/build hscontrol
57
+ go build -ldflags="-s -w" -o headscale ./cmd/headscale
58
+
59
+ - name : Build Docker image
60
+ run : |
61
+ echo "FROM alpine:latest" > Dockerfile
62
+ echo "COPY headscale /usr/local/bin/headscale" >> Dockerfile
63
+ echo "ENTRYPOINT [\"headscale\", \"serve\"]" >> Dockerfile
64
+ docker build -t ghcr.io/${{ github.repository }}:dev .
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ concurrency:
14
14
15
15
jobs :
16
16
build-nix :
17
- runs-on : ubuntu-latest
17
+ runs-on : self-hosted
18
18
permissions : write-all
19
19
steps :
20
20
- uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments