File tree Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1212 image :
1313 - reactphp # Jan 2020
1414 - nodejs # Feb 2020
15+ - go # Mar 2020
1516 runs-on : ubuntu-latest
1617 steps :
1718 - uses : actions/checkout@v1
2728 - random # Random image every time this workflow is executed
2829 - reactphp # Jan 2020
2930 - nodejs # Feb 2020
31+ - go # Mar 2020
3032 needs :
3133 - lint-dockerfile
3234 runs-on : ubuntu-latest
4850 - random # Random image every time this workflow is executed
4951 - reactphp # Jan 2020
5052 - nodejs # Feb 2020
53+ - go # Mar 2020
5154 needs : build-docker-image
5255 runs-on : ubuntu-latest
5356 steps :
7679 - random # Random image every time this workflow is executed
7780 - reactphp # Jan 2020
7881 - nodejs # Feb 2020
82+ - go # Mar 2020
7983 rules : [customHosts, nonWwwToWww, wwwToNonWww]
8084 runs-on : ubuntu-latest
8185 steps :
@@ -135,6 +139,7 @@ jobs:
135139 - random # Random image every time this workflow is executed
136140 - reactphp # Jan 2020
137141 - nodejs # Feb 2020
142+ - go # Mar 2020
138143 needs : tests
139144 runs-on : ubuntu-latest
140145 steps :
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ ensure the same behavior across languages.
2424* ` random ` - Each time when the images are build a random image is selected and build.
2525* ` reactphp ` - Using [ ReactPHP] ( https://reactphp.org/ ) (January 2020)
2626* ` nodejs ` - Using [ NodeJS] ( https://nodejs.org/en/ ) (February 2020)
27+ * ` go ` - Using [ Go] ( https://nodejs.org/en/ ) (March 2020)
2728
2829## Configuration
2930
Original file line number Diff line number Diff line change 1+ FROM golang:1.14-alpine3.11 AS build
2+
3+ RUN mkdir /opt/app
4+ WORKDIR /opt/app
5+
6+ COPY app.go /opt/app
7+
8+ # hadolint ignore=DL3018,DL3019
9+ RUN apk add git gcc musl-dev godep
10+
11+ ENV GOBIN /go/bin
12+ ENV GO111MODULE on
13+
14+ WORKDIR /go
15+
16+ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-w' -o /app /opt/app/app.go
17+
18+ # ## App
19+ FROM scratch AS app
20+
21+ COPY --from=build /app /app
22+
23+ ENTRYPOINT ["/app" ]
Original file line number Diff line number Diff line change 1+ package main
2+
3+ func main () {
4+ }
You can’t perform that action at this time.
0 commit comments