1
+ name : Build cloudflared for JF MIPSel
2
+
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ permissions :
7
+ contents : write
8
+
9
+ jobs :
10
+ build-cloudflared :
11
+ runs-on : ubuntu-latest
12
+ name : Cross-compile cloudflared for mipsel-uclibc
13
+
14
+ steps :
15
+ - name : Checkout cloudflared repo
16
+ uses : actions/checkout@v4
17
+ with :
18
+ repository : cloudflare/cloudflared
19
+ path : cloudflared
20
+ fetch-depth : 0
21
+
22
+ - name : Checkout cf-go repo
23
+ uses : actions/checkout@v4
24
+ with :
25
+ repository : cloudflare/go
26
+ path : go
27
+
28
+ - name : Download and extract MIPSel toolchain
29
+ run : |
30
+ wget https://github.com/JFC-Group/JF-Buildroot/releases/download/2015.08.1/mipsel-buildroot-linux-uclibc-toolchain-2015.08.1.tar
31
+ tar -xf mipsel-buildroot-linux-uclibc-toolchain-2015.08.1.tar
32
+
33
+ - name : Set up Go
34
+ uses : actions/setup-go@v5
35
+ with :
36
+ go-version-file : " ./go/src/go.mod"
37
+
38
+ - name : Build cf-go
39
+ working-directory : go/src
40
+ run : ./make.bash
41
+
42
+ - name : Set environment variables
43
+ run : |
44
+ echo "$(pwd)/go/bin" >> $GITHUB_PATH
45
+ echo "$(pwd)/mipsel-buildroot-linux-uclibc-toolchain-2015.08.1/usr/bin" >> $GITHUB_PATH
46
+ echo "LD_LIBRARY_PATH=$(pwd)/mipsel-buildroot-linux-uclibc-toolchain-2015.08.1/usr/lib" >> $GITHUB_ENV
47
+ echo "CC=$(pwd)/mipsel-buildroot-linux-uclibc-toolchain-2015.08.1/usr/bin/mipsel-buildroot-linux-uclibc-gcc" >> $GITHUB_ENV
48
+ echo "GOARCH=mipsle" >> $GITHUB_ENV
49
+ echo "GOOS=linux" >> $GITHUB_ENV
50
+
51
+ - name : Build cloudflared
52
+ working-directory : cloudflared
53
+ run : |
54
+ go build -o cloudflared ./cmd/cloudflared
55
+
56
+ - name : Release name
57
+ id : release_name
58
+ working-directory : cloudflared
59
+ run : |
60
+ echo "release_name=$(git describe --tags)" >> "$GITHUB_OUTPUT"
61
+
62
+ - name : Generate tag name
63
+ id : tag
64
+ run : |
65
+ TAG_NAME="release-$(date +%Y%m%d-%H%M%S)"
66
+ echo "tag_name=$TAG_NAME" >> "$GITHUB_OUTPUT"
67
+
68
+ - name : Create Release and Upload Binaries
69
+ uses : softprops/action-gh-release@v2
70
+ with :
71
+ files : |
72
+ cloudflared/cloudflared
73
+ name : ${{ steps.release_name.outputs.release_name }}
74
+ tag_name : ${{ steps.tag.outputs.tag_name }}
75
+ make_latest : true
76
+ draft : false
77
+ prerelease : ${{ github.ref_name != 'main' }}
78
+ env :
79
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments