-
Notifications
You must be signed in to change notification settings - Fork 46
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
152 additions
and
37 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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,5 @@ | ||
# These owners will be the default owners for everything in the repo. | ||
# Unless a later match takes precedence, @o1egl will be requested for | ||
# review when someone opens a pull request. | ||
|
||
* @o1egl |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
tags: v* | ||
pull_request: | ||
branches: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.37.1 | ||
skip-go-installation: true | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
- name: Test | ||
run: go test -race -timeout=60s -v -coverprofile=coverage.txt -covermode=atomic ./... | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.txt | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: [lint, test] | ||
if: startsWith(github.event.ref, 'refs/tags/v') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
build/ | ||
.idea | ||
vendor | ||
coverage.txt | ||
coverage.txt | ||
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM alpine:latest as alpine | ||
RUN apk --update add ca-certificates | ||
RUN apk --update add mailcap | ||
|
||
FROM scratch | ||
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||
COPY --from=alpine /etc/mime.types /etc/mime.types | ||
|
||
VOLUME /data | ||
|
||
COPY govatar /govatar | ||
|
||
ENTRYPOINT [ "/govatar" ] |
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,71 @@ | ||
project_name: govatar | ||
|
||
before: | ||
hooks: | ||
- go mod download | ||
|
||
build: | ||
env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
- -s -w -X main.version={{ .Version }} | ||
main: govatar/main.go | ||
binary: govatar | ||
goos: | ||
- darwin | ||
- linux | ||
- windows | ||
- freebsd | ||
goarch: | ||
- amd64 | ||
- 386 | ||
- arm | ||
- arm64 | ||
goarm: | ||
- 5 | ||
- 6 | ||
- 7 | ||
ignore: | ||
- goos: darwin | ||
goarch: 386 | ||
- goos: freebsd | ||
goarch: arm | ||
|
||
archives: | ||
- | ||
name_template: "{{.Os}}-{{.Arch}}{{if .Arm}}v{{.Arm}}{{end}}-{{ .ProjectName }}" | ||
format: tar.gz | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
dockers: | ||
- | ||
dockerfile: Dockerfile | ||
goos: linux | ||
goarch: amd64 | ||
goarm: '' | ||
image_templates: | ||
- "o1egl/govatar:latest" | ||
- "o1egl/govatar:{{ .Tag }}" | ||
- "o1egl/govatar:v{{ .Major }}" | ||
build_flag_templates: | ||
- "--pull" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.authors=Oleg Lobanov" | ||
- "--label=org.opencontainers.image.title={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
|
||
brews: | ||
- name: govatar | ||
tap: | ||
owner: o1egl | ||
name: homebrew-tap | ||
folder: Formula | ||
homepage: https://github.com/o1egl/govatar | ||
commit_author: | ||
name: Oleg Lobanov | ||
email: [email protected] | ||
description: GOvatar is an avatar generation library written in GO | ||
license: "MIT" |