From dd38848e27ae0038f24009918da28d5817f941dd Mon Sep 17 00:00:00 2001 From: nakabonne Date: Thu, 23 Jul 2020 10:25:26 +0900 Subject: [PATCH] Enable to install with docker --- .github/workflows/release.yml | 6 ++++-- .goreleaser.yml | 13 +++++++++++++ Dockerfile | 6 ++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1680018..d0d8745 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,13 +12,15 @@ jobs: - name: Unshallow run: git fetch --prune --unshallow - name: Setup Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v2 with: go-version: 1.14 + - name: Login docker.io + run: docker login -u nakabonne -p ${{ secrets.DOCKER_PASSWORD }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: version: latest args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_WITH_REPO_PERM}} + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN_WITH_REPO_PERM }} diff --git a/.goreleaser.yml b/.goreleaser.yml index b12ca68..b0c6904 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -16,16 +16,20 @@ builds: env: - CGO_ENABLED=0 ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} + archives: - replacements: darwin: Darwin linux: Linux 386: 32-bit amd64: x86_64 + checksum: name_template: 'checksums.txt' + snapshot: name_template: "{{ .Tag }}-next" + changelog: filters: exclude: @@ -37,3 +41,12 @@ brews: name: homebrew-golintui homepage: 'https://github.com/nakabonne/golintui' description: 'A simple terminal UI for golangci-lint' + +dockers: + - dockerfile: Dockerfile + binaries: + - golintui + image_templates: + - "nakabonne/golintui:latest" + - "nakabonne/golintui:{{ .Tag }}" + - "nakabonne/golintui:v{{ .Major }}.{{ .Minor }}" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1494db1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM golang:1.14 + +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.29.0 + +COPY golintui /usr/bin/ +CMD ["golintui"]