This repository has been archived by the owner on Jun 13, 2022. It is now read-only.
forked from jeessy2/ddns-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: always release Update .goreleaser.yml Update release.yml HACK: strip unnecessary bits ci: format chore: ignore dist chore: update
- Loading branch information
Showing
46 changed files
with
233 additions
and
2,836 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build with xgo | ||
uses: crazy-max/ghaction-xgo@v1 | ||
with: | ||
xgo_version: latest | ||
go_version: 1.18 | ||
dest: dist | ||
prefix: dnsd | ||
targets: windows/386,windows/amd64,windows/arm64,linux/386,linux/amd64,linux/arm,linux/arm64,darwin/amd64,darwin/arm64 | ||
ldflags: -s -w | ||
buildmode: default | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: dist/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
# Compiled Object files, Static and Dynamic libs (Shared Objects) | ||
*.o | ||
*.a | ||
# Created by https://www.toptal.com/developers/gitignore/api/go | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=go | ||
|
||
### Go ### | ||
# If you prefer the allow list template instead of the deny list, see community template: | ||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore | ||
# | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
/ddns-go | ||
__* | ||
*.dylib | ||
/dnsd | ||
|
||
# Folders | ||
_obj | ||
_test | ||
.vagrant | ||
releases | ||
tmp | ||
/.idea/ | ||
vendor/ | ||
/dist | ||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Architecture specific extensions/prefixes | ||
trace.out | ||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
.DS_Store | ||
_testmain.go | ||
|
||
*.exe | ||
*.test | ||
*.prof | ||
profile.cov | ||
coverage.html | ||
/go.sum | ||
# Go workspace file | ||
go.work | ||
|
||
### Go Patch ### | ||
/vendor/ | ||
/Godeps/ | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/go | ||
|
||
# Emacs backup files | ||
*~ | ||
.*~ | ||
/.idea/ | ||
/.vscode/ | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,32 @@ | ||
# This is an example goreleaser.yaml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod download | ||
# you may remove this if you don't need go generate | ||
- go generate ./... | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
- env: [CGO_ENABLED=0] | ||
flags: | ||
- -trimpath | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
- freebsd | ||
goarch: | ||
- 386 | ||
- amd64 | ||
- arm | ||
- arm64 | ||
- mips | ||
- mipsle | ||
- mips64 | ||
- mips64le | ||
- "386" | ||
- "amd64" | ||
- "arm" | ||
- "arm64" | ||
- "mips" | ||
gomips: | ||
- hardfloat | ||
- softfloat | ||
ldflags: | ||
- -s -w -X main.version={{.Tag}} -X main.buildTime={{.Date}} | ||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
mod_timestamp: '{{ .CommitTimestamp }}' | ||
dockers: | ||
- image_templates: ["ghcr.io/traidento/dnsd:{{ .Version }}"] | ||
use: buildx | ||
dockerfile: Dockerfile | ||
build_flag_templates: | ||
- --label=org.opencontainers.image.title={{ .ProjectName }} | ||
- --label=org.opencontainers.image.description=Lightweight DDNS daemon | ||
- --label=org.opencontainers.image.url=https://github.com/traidento/dnsd | ||
- --label=org.opencontainers.image.source=https://github.com/traidento/dnsd | ||
- --label=org.opencontainers.image.version={{ .Version }} | ||
- --label=org.opencontainers.image.created={{ time "2022-05-02T16:09:08+08:00" }} | ||
- --label=org.opencontainers.image.revision={{ .FullCommit }} | ||
- --label=org.opencontainers.image.licenses=MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,7 @@ | ||
# build stage | ||
FROM golang:1.17 AS builder | ||
FROM scratch | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN go env -w GO111MODULE=on \ | ||
&& go env -w GOPROXY=https://goproxy.cn,direct \ | ||
&& make clean build | ||
ENV UPDATE_INTERVAL="300" | ||
|
||
# final stage | ||
FROM alpine | ||
LABEL name=ddns-go | ||
LABEL url=https://github.com/jeessy2/ddns-go | ||
COPY dnsd /usr/bin/dnsd | ||
|
||
WORKDIR /app | ||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ | ||
&& apk add --no-cache tzdata | ||
ENV TZ=Asia/Shanghai | ||
COPY --from=builder /app/ddns-go /app/ddns-go | ||
EXPOSE 9876 | ||
ENTRYPOINT ["/app/ddns-go"] | ||
CMD ["-l", ":9876", "-f", "300"] | ||
ENTRYPOINT ["/usr/bin/dnsd"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.