-
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.
- Loading branch information
0 parents
commit 0610033
Showing
41 changed files
with
4,420 additions
and
0 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,46 @@ | ||
name: Build and release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '~1.20' | ||
id: go | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
fetch-depth: 0 | ||
- name: Checkout LFS objects | ||
run: git lfs checkout | ||
- name: Pull tag | ||
run: git fetch --tags | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,8 @@ | ||
/*.sqlite | ||
.idea | ||
.vscode | ||
.DS_Store | ||
/dist | ||
/.local | ||
/.goreleaser.local.yaml |
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,18 @@ | ||
run: | ||
tests: false | ||
linters: | ||
enable-all: true | ||
disable: | ||
- goerr113 | ||
- contextcheck | ||
- exhaustivestruct | ||
- wrapcheck | ||
- varnamelen | ||
- exhaustruct | ||
- lll | ||
- wsl | ||
- nlreturn | ||
- gofumpt | ||
- funlen | ||
- gci | ||
- nonamedreturns |
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,58 @@ | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
flags: | ||
- -trimpath | ||
goarch: | ||
- arm64 | ||
- amd64 | ||
main: ./cmd/token-login/main.go | ||
binary: token-login | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
dockers: | ||
- image_templates: | ||
- "ghcr.io/reddec/{{ .ProjectName }}:{{ .Version }}-amd64" | ||
use: buildx | ||
dockerfile: Dockerfile | ||
build_flag_templates: | ||
- "--platform=linux/amd64" | ||
- image_templates: | ||
- "ghcr.io/reddec/{{ .ProjectName }}:{{ .Version }}-arm64v8" | ||
use: buildx | ||
goarch: arm64 | ||
dockerfile: Dockerfile | ||
build_flag_templates: | ||
- "--platform=linux/arm64/v8" | ||
docker_manifests: | ||
- name_template: "ghcr.io/reddec/{{ .ProjectName }}:{{ .Version }}" | ||
image_templates: | ||
- "ghcr.io/reddec/{{ .ProjectName }}:{{ .Version }}-amd64" | ||
- "ghcr.io/reddec/{{ .ProjectName }}:{{ .Version }}-arm64v8" | ||
# alias for latest | ||
- name_template: "ghcr.io/reddec/{{ .ProjectName }}:latest" | ||
image_templates: | ||
- "ghcr.io/reddec/{{ .ProjectName }}:{{ .Version }}-amd64" | ||
- "ghcr.io/reddec/{{ .ProjectName }}:{{ .Version }}-arm64v8" | ||
# alias for major version (x) | ||
- name_template: "ghcr.io/reddec/{{ .ProjectName }}:{{.Major}}" | ||
image_templates: | ||
- "ghcr.io/reddec/{{ .ProjectName }}:{{ .Version }}-amd64" | ||
- "ghcr.io/reddec/{{ .ProjectName }}:{{ .Version }}-arm64v8" | ||
# alias for minor version (x.y) | ||
- name_template: "ghcr.io/reddec/{{ .ProjectName }}:{{.Major}}.{{.Minor}}" | ||
image_templates: | ||
- "ghcr.io/reddec/{{ .ProjectName }}:{{ .Version }}-amd64" | ||
- "ghcr.io/reddec/{{ .ProjectName }}:{{ .Version }}-arm64v8" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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,7 @@ | ||
FROM scratch | ||
# 8080 for Admin UI, 8081 for Auth | ||
EXPOSE 8080/tcp 8081/tcp | ||
VOLUME /data | ||
ENV DB_URL="sqlite:///data/token-login.sqlite?cache=shared" | ||
ENTRYPOINT ["/token-login"] | ||
ADD token-login / |
Oops, something went wrong.