File tree Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 12
12
* .out
13
13
14
14
sync-ssh-keys
15
+ sync-ssh-keys_ *
Original file line number Diff line number Diff line change 1
1
FROM golang:1.12-stretch AS builder
2
2
3
3
ENV GO111MODULE=on
4
+ ENV CGO_ENABLED=0
4
5
5
6
# Download tools
6
7
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1
@@ -14,6 +15,7 @@ RUN make deps
14
15
COPY . .
15
16
16
17
RUN make build
18
+
17
19
# Copy binary to alpine
18
20
FROM alpine:3.10
19
21
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
Original file line number Diff line number Diff line change @@ -10,15 +10,15 @@ LDFLAGS=-ldflags "-X=main.Version=$(VERSION) -X=main.Build=$(BUILD_ID)"
10
10
all : build
11
11
12
12
build :
13
- GO111MODULE=on go build -v $(LDFLAGS ) -o $(BIN ) $(SRC )
13
+ CGO_ENABLED=0 GO111MODULE=on go build -v $(LDFLAGS ) -o $(BIN ) $(SRC )
14
14
15
15
docker-build :
16
16
docker build -t $(DOCKER_IMAGE ) :${VERSION} .
17
17
18
- release :
19
- GOOS=linux GOARCH=arm64 GO111MODULE=on go build $(LDFLAGS ) -o $(BIN ) _$(VERSION ) _linux-amd64 $(SRC )
20
- GOOS=linux GOARCH=arm GO111MODULE=on go build $(LDFLAGS ) -o $(BIN ) _$(VERSION ) _linux-arm $(SRC )
21
- GOOS=freebsd GOARCH=386 GO111MODULE=on go build $(LDFLAGS ) -o $(BIN ) _$(VERSION ) _freebsd-386 $(SRC )
18
+ release : deps
19
+ CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on go build $(LDFLAGS ) -o $(BIN ) _$(VERSION ) _linux-amd64 $(SRC )
20
+ CGO_ENABLED=0 GOOS=linux GOARCH=arm GO111MODULE=on go build $(LDFLAGS ) -o $(BIN ) _$(VERSION ) _linux-arm $(SRC )
21
+ CGO_ENABLED=0 GOOS=freebsd GOARCH=386 GO111MODULE=on go build $(LDFLAGS ) -o $(BIN ) _$(VERSION ) _freebsd-386 $(SRC )
22
22
23
23
docker-release : docker-build
24
24
docker push $(DOCKER_IMAGE ) :${VERSION}
Original file line number Diff line number Diff line change @@ -16,6 +16,13 @@ $ curl -o /usr/local/bin/sync-ssh-keys \
16
16
$ chmod +x /usr/local/bin/sync-ssh-keys
17
17
```
18
18
19
+ or
20
+
21
+ ``` bash
22
+ $ docker pull samber/sync-ssh-keys:0.3.0
23
+ $ docker run --rm samber/sync-ssh-keys:0.3.0 --github-username samber
24
+ ```
25
+
19
26
### Sync using a crontask
20
27
21
28
``` bash
@@ -38,11 +45,14 @@ usage: sync-ssh-keys [<flags>]
38
45
Flags:
39
46
--help Show context-sensitive help (also try --help-long and --help-man).
40
47
48
+
41
49
-o, --output=OUTPUT Write output to < file> . Default to stdout
42
50
--Werror=WERROR Treat warning as errors. Fatal error if organization, team or user does not exist.
43
51
52
+
44
53
--local-path=LOCAL-PATH Path to a local authorized_keys file. It can be useful in case of network failure ; )
45
54
55
+
46
56
--github-endpoint=GITHUB-ENDPOINT
47
57
Github Enterprise endpoint.
48
58
--github-token=GITHUB-TOKEN
55
65
--exclude-github-username=EXCLUDE-GITHUB-USERNAME ...
56
66
Username(s) to explicitly exclude.
57
67
68
+
58
69
--gitlab-endpoint=GITLAB-ENDPOINT
59
70
Gitlab endpoint.
60
71
--gitlab-token=GITLAB-TOKEN
66
77
--exclude-gitlab-username=EXCLUDE-GITLAB-USERNAME ...
67
78
Username(s) to explicitly exclude.
68
79
69
- --version Show application version.
70
80
81
+ --version Show application version.
71
82
` ` `
72
83
73
84
# ## Simple user
You can’t perform that action at this time.
0 commit comments