File tree Expand file tree Collapse file tree 6 files changed +27
-22
lines changed Expand file tree Collapse file tree 6 files changed +27
-22
lines changed Original file line number Diff line number Diff line change @@ -7,4 +7,5 @@ ROADMAP.md
77build
88.env
99data.db
10- app /node_modules
10+ app /node_modules
11+ app /build
Original file line number Diff line number Diff line change 88 runs-on : ubuntu-latest
99 steps :
1010 - uses : actions/checkout@v2
11+ - uses : actions/setup-node@v2
12+ with :
13+ node-version : ' 16'
14+ - uses : actions/setup-go@v2
15+ with :
16+ go-version : ' ^1.17.3'
1117 - name : Install dependencies
1218 run : |
1319 sudo apt-get install build-essential wget zip gcc-mingw-w64 && \
14- sudo apt-get remove --auto-remove golang-go && \
15- sudo rm -rf /usr/bin/go &&\
16- wget --progress=dot:mega https://golang.org/dl/go1.17.1.linux-amd64.tar.gz -O go-linux.tar.gz && \
17- sudo tar -zxf go-linux.tar.gz && \
18- sudo mv go /usr/bin/ && \
19- sudo mkdir -p /go/bin /go/src /go/pkg && \
20- export GO_HOME=/usr/bin/go && \
21- export GOPATH=/go && \
22- export PATH=${GOPATH}/bin:${GO_HOME}/bin/:$PATH && \
23- echo "/usr/bin/go/bin" >> $GITHUB_PATH
24- echo "/usr/bin/x86_64-w64-mingw32-gcc" >> GITHUB_PATH
25- go version && \
20+ echo "/usr/bin/x86_64-w64-mingw32-gcc" >> GITHUB_PATH && \
2621 wget --no-check-certificate --progress=dot:mega https://github.com/wangyoucao577/assets-uploader/releases/download/v0.3.0/github-assets-uploader-v0.3.0-linux-amd64.tar.gz -O github-assets-uploader.tar.gz && \
2722 tar -zxf github-assets-uploader.tar.gz && \
2823 sudo mv github-assets-uploader /usr/sbin/ && \
2924 sudo rm -f github-assets-uploader.tar.gz && \
30- github-assets-uploader -version
25+ github-assets-uploader -version && \
26+ make build-app
3127 - name : Print Go paths
3228 run : whereis go
3329 - name : Print Go Version
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ server/server
22server /.env
33data
44app /node_modules
5+ app /build
56build
67.env
78data.db
Original file line number Diff line number Diff line change 1- FROM golang:1.17-alpine as builder
2- WORKDIR /app
1+ FROM golang:1.17-alpine as go- builder
2+ WORKDIR /authorizer
33COPY server server
44COPY Makefile .
55
66ARG VERSION="latest"
77ENV VERSION="$VERSION"
88
99RUN echo "$VERSION"
10- RUN apk add build-base nodejs &&\
10+ RUN apk add build-base &&\
1111 make clean && make && \
1212 chmod 777 build/server
1313
14+ FROM node:17-alpine3.12 as node-builder
15+ WORKDIR /authorizer
16+ COPY app app
17+ COPY Makefile .
18+ RUN apk add build-base &&\
19+ make build-app
20+
1421FROM alpine:latest
15- RUN apk --no-cache add ca-certificates
1622WORKDIR /root/
17- COPY app app
23+ RUN mkdir app
24+ COPY --from=node-builder /authorizer/app/build app/build
25+ COPY --from=go-builder /authorizer/build build
1826COPY templates templates
19- COPY --from=builder /app/build build
2027EXPOSE 8080
2128CMD [ "./build/server" ]
Original file line number Diff line number Diff line change 1111 "author" : " Lakhan Samani" ,
1212 "license" : " ISC" ,
1313 "dependencies" : {
14- "@authorizerdev/authorizer-react" : " ^0.3.0 " ,
14+ "@authorizerdev/authorizer-react" : " latest " ,
1515 "@types/react" : " ^17.0.15" ,
1616 "@types/react-dom" : " ^17.0.9" ,
1717 "esbuild" : " ^0.12.17" ,
Original file line number Diff line number Diff line change 11VERSION=" $1 "
2- make clean && CGO_ENABLED=1 VERSION=${VERSION} make
2+ make clean && make build-app && CGO_ENABLED=1 VERSION=${VERSION} make
33FILE_NAME=authorizer-${VERSION} -darwin-amd64.tar.gz
44tar cvfz ${FILE_NAME} .env app/build build templates
55AUTH=" Authorization: token $GITHUB_TOKEN "
You can’t perform that action at this time.
0 commit comments