File tree Expand file tree Collapse file tree 4 files changed +62
-35
lines changed
Expand file tree Collapse file tree 4 files changed +62
-35
lines changed Original file line number Diff line number Diff line change 1+ name : build
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ -
13+ name : Checkout
14+ uses : actions/checkout@v2
15+ with :
16+ fetch-depth : 0
17+ -
18+ name : Set up Go
19+ uses : actions/setup-go@v2
20+ with :
21+ go-version : 1.16
22+ -
23+ name : Cache Go modules
24+ uses : actions/cache@v2
25+ with :
26+ path : ~/go/pkg/mod
27+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
28+ restore-keys : |
29+ ${{ runner.os }}-go-
30+ -
31+ name : Docker Login
32+ uses : docker/login-action@v1
33+ with :
34+ username : ${{ secrets.DOCKERHUB_USERNAME }}
35+ password : ${{ secrets.DOCKERHUB_TOKEN }}
36+ -
37+ name : Run GoReleaser
38+ uses : goreleaser/goreleaser-action@v2
39+ with :
40+ version : latest
41+ args : release --rm-dist
42+ env :
43+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ project_name : changemonitor
2+ builds :
3+ - env : [CGO_ENABLED=0]
4+ goos :
5+ - linux
6+ - windows
7+ - darwin
8+ goarch :
9+ - amd64
10+ - arm64
11+ dockers :
12+ - goos : linux
13+ goarch : amd64
14+ image_templates :
15+ - " ordspilleren/{{.ProjectName}}:latest"
16+ - " ordspilleren/{{.ProjectName}}:{{ .Tag }}"
17+ dockerfile : Dockerfile
Original file line number Diff line number Diff line change 1- # Build image
2- FROM golang:alpine AS build
3- WORKDIR /app
4- COPY go.mod go.sum ./
5- RUN go mod download
6- COPY . ./
7- RUN CGO_ENABLED=0 GOOS=linux go build -o ./out/app .
8-
9- # Runtime image
101FROM alpine
11- COPY --from=build /app/out/app / usr/local /bin/changemonitor
2+ COPY changemonitor / usr/bin/changemonitor
123RUN apk add --no-cache tzdata
134ENV CONFIG_FILE=/config/config.json
145ENV STORAGE_DIRECTORY=/data
156ENV CHROME_WS=ws://127.0.0.1:9222
167ENV ENABLE_WEBUI=false
17- ENTRYPOINT ["/usr/local/ bin/changemonitor" ]
8+ ENTRYPOINT ["/usr/bin/changemonitor" ]
You can’t perform that action at this time.
0 commit comments