File tree 3 files changed +5
-42
lines changed
3 files changed +5
-42
lines changed Original file line number Diff line number Diff line change 74
74
cache-to : type=registry,ref=${{ steps.meta.outputs.name }}:buildcache,mode=max
75
75
tags : ${{ steps.meta.outputs.tags }}
76
76
labels : ${{ steps.meta.outputs.labels }}
77
- platforms : linux/amd64
77
+ platforms : linux/amd64,linux/arm64
78
78
#
79
79
username : ${{ secrets.DOCKERHUB_USERNAME }}
80
80
password : ${{ secrets.DOCKERHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ COPY . .
13
13
14
14
RUN CGO_ENABLED=0 \
15
15
GOOS=linux \
16
- GOARCH=amd64 \
17
16
go build \
18
17
-trimpath \
19
18
-ldflags '-w -s -buildid=' \
@@ -37,7 +36,7 @@ ENV VERSION=${VERSION}
37
36
38
37
RUN zmicro package install ngrok
39
38
40
- RUN zmicro package install cpolar
39
+ # RUN zmicro package install cpolar
41
40
42
41
COPY ./entrypoint.sh /
43
42
Original file line number Diff line number Diff line change @@ -76,45 +76,9 @@ runtunnel() {
76
76
log::info " [$( timestamp) ] ngrok url: $( color::green $url ) "
77
77
78
78
export SITE_URL=$url
79
- elif [ " $TUNNEL_TYPE " = " cpolar" ]; then
80
- if [ -n " $tunnel_subdomain " ] && [ -z " $tunnel_auth_token " ]; then
81
- log::error " [$( timestamp) ] tunnel_auth_token is required when use tunnel_subdomain"
82
- return 1
83
- fi
84
-
85
- if [ -n " $tunnel_auth_token " ]; then
86
- zmicro cpolar authtoken $tunnel_auth_token >> /dev/null
87
- fi
88
-
89
- if [ -n " $tunnel_subdomain " ]; then
90
- zmicro cpolar http --subdomain " $tunnel_subdomain " ${PORT} --log $tunnel_log >> $tunnel_log 2>&1 &
91
- else
92
- zmicro cpolar http ${PORT} --log $tunnel_log >> $tunnel_log 2>&1 &
93
- fi
94
-
95
- log::info " [$( timestamp) ] starting cpolar ..."
96
- # sleep 3
97
-
98
- local cpolar_url=" "
99
- while [ -z " $cpolar_url " ]; do
100
- sleep 1
101
-
102
- log::info " [$( timestamp) ] checking whether cpolar connected ..."
103
- cpolar_url=$( cat $tunnel_log | grep " established" | grep " https" | awk -F ' at ' ' {print $2}' | awk -F ' "' ' {print $1}' )
104
- if [ -n " $cpolar_url " ]; then
105
- break
106
- fi
107
-
108
- if [ " $DEBUG " = " true" ]; then
109
- log::info " [$( timestamp) ] show cpolar connection info start ..."
110
- cat $tunnel_log
111
- log::info " [$( timestamp) ] show cpolar connection info end ..."
112
- fi
113
- done
114
-
115
- log::info " [$( timestamp) ] cpolar url: $( color::green $cpolar_url ) "
116
-
117
- export SITE_URL=$cpolar_url
79
+ else
80
+ log::error " [$( timestamp) ] unsupport TUNNEL_TYPE: $TUNNEL_TYPE "
81
+ return 1
118
82
fi
119
83
}
120
84
You can’t perform that action at this time.
0 commit comments