-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
134 additions
and
102 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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/docker/Dockerfile.dev | ||
/docker/Dockerfile | ||
/ui/node_modules/ | ||
.idea/ | ||
build/ |
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,21 @@ | ||
name: build | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22.x | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
- uses: actions/checkout@v4 | ||
- run: make download-tools | ||
- run: make install | ||
- run: make generate | ||
- run: make lint | ||
- run: make test | ||
- run: make bulid-js | ||
- run: make release |
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,4 +1,5 @@ | ||
.idea | ||
dist/ | ||
build | ||
vendor | ||
coverage.txt | ||
|
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,99 @@ | ||
project_name: traggo | ||
builds: | ||
- id: linux-amd64 | ||
main: ./ | ||
goos: | ||
- linux | ||
goarch: | ||
- 'amd64' | ||
flags: ['-tags="netgo osusergo sqlite_omit_load_extension"'] | ||
ldflags: ["-s","-w","-linkmode","external","-extldflags","-static","-X main.BuildDate={{.Date}}","-X main.BuildMode=prod","-X main.BuildCommit={{.Commit}}","-X main.BuildVersion={{.Version}}"] | ||
- id: linux-armhf | ||
main: ./ | ||
goos: [linux] | ||
goarch: [arm] | ||
goarm: [7] | ||
env: [CC=arm-linux-gnueabihf-gcc, CXX=arm-linux-gnueabihf-g++] | ||
flags: ['-tags="netgo osusergo sqlite_omit_load_extension"'] | ||
ldflags: ["-s","-w","-linkmode","external","-extldflags","-static","-X main.BuildDate={{.Date}}","-X main.BuildMode=prod","-X main.BuildCommit={{.Commit}}","-X main.BuildVersion={{.Version}}"] | ||
- id: linux-arm64 | ||
main: ./ | ||
goos: [linux] | ||
goarch: [arm64] | ||
env: [CC=aarch64-linux-gnu-gcc, CXX=aarch64-linux-gnu-g++] | ||
flags: ['-tags="netgo osusergo sqlite_omit_load_extension"'] | ||
ldflags: ["-s","-w","-linkmode","external","-extldflags","-static","-X main.BuildDate={{.Date}}","-X main.BuildMode=prod","-X main.BuildCommit={{.Commit}}","-X main.BuildVersion={{.Version}}"] | ||
- id: windows-amd64 | ||
main: ./ | ||
goos: [windows] | ||
goarch: [amd64] | ||
env: [CC=x86_64-w64-mingw32-gcc, CXX=x86_64-w64-mingw32-gcc] | ||
flags: ['-tags="netgo osusergo sqlite_omit_load_extension"'] | ||
ldflags: ["-s","-w","-linkmode","external","-extldflags","-static","-X main.BuildDate={{.Date}}","-X main.BuildMode=prod","-X main.BuildCommit={{.Commit}}","-X main.BuildVersion={{.Version}}"] | ||
archives: | ||
- files: | ||
- LICENSE | ||
- README.md | ||
- .env.sample | ||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{- if eq .Arch "386" }}i386{{- else }}{{ .Arch }}{{ end }}{{ if .Arm }}v{{ .Arm }}{{ end }}' | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
checksum: | ||
disable: true | ||
changelog: | ||
skip: true | ||
dockers: | ||
- use: buildx | ||
goos: linux | ||
goarch: amd64 | ||
goarm: "" | ||
image_templates: | ||
- "traggo/server:amd64-latest" | ||
- "traggo/server:amd64-{{ .RawVersion }}" | ||
dockerfile: docker/Dockerfile | ||
build_flag_templates: | ||
- "--platform=linux/amd64" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.title={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
- use: buildx | ||
goos: linux | ||
goarch: arm64 | ||
goarm: "" | ||
image_templates: | ||
- "traggo/server:arm64-latest" | ||
- "traggo/server:arm64-{{ .RawVersion }}" | ||
dockerfile: docker/Dockerfile | ||
build_flag_templates: | ||
- "--platform=linux/arm64" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.title={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
- use: buildx | ||
goos: linux | ||
goarch: arm | ||
goarm: 7 | ||
image_templates: | ||
- "traggo/server:armv7-latest" | ||
- "traggo/server:armv7-{{ .RawVersion }}" | ||
dockerfile: docker/Dockerfile | ||
build_flag_templates: | ||
- "--platform=linux/arm/v7" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.title={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
docker_manifests: | ||
- name_template: "traggo/server:latest" | ||
image_templates: | ||
- "screego/server:amd64-latest" | ||
- "screego/server:arm64-latest" | ||
- "screego/server:armv7-latest" | ||
- name_template: "traggo/server:{{ .RawVersion }}" | ||
image_templates: | ||
- "screego/server:amd64-{{ .RawVersion }}" | ||
- "screego/server:arm64-{{ .RawVersion }}" | ||
- "screego/server:armv7-{{ .RawVersion }}" |
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,5 +1,5 @@ | ||
FROM scratch | ||
WORKDIR /opt/traggo | ||
ADD traggo /opt/traggo | ||
COPY traggo /opt/traggo | ||
EXPOSE 3030 | ||
ENTRYPOINT ["./traggo"] |