Skip to content

Commit

Permalink
Merge pull request #2 from Savid/feat/rename
Browse files Browse the repository at this point in the history
feat/rename
  • Loading branch information
Savid committed Sep 12, 2022
2 parents bad5682 + 15b827b commit 5bc1f5d
Show file tree
Hide file tree
Showing 12 changed files with 830 additions and 31 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- main
# push:
# tags:
# - v*
# branches:
# - master
pull_request:
permissions:
contents: read
Expand Down
119 changes: 119 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
project_name: ethereum-account-metrics-exporter

before:
hooks:
- go mod tidy
- go generate ./...
- make build-web
builds:
- env:
- CGO_ENABLED=0
binary: ethereum-account-metrics-exporter-{{.Version}}
goos:
- linux
- windows
- darwin

goarch:
- amd64
- arm64
goarm:
- 6
- 7
ignore:
- goarch: 386
ldflags:
- -s -w -X github.com/savid/ethereum-account-metrics-exporter/pkg/version.Release={{.Tag}} -X github.com/savid/ethereum-account-metrics-exporter/pkg/version.GitCommit={{.ShortCommit}}
mod_timestamp: "{{ .CommitTimestamp }}"
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

dockers:
## Scratch
- use: buildx
goos: linux
goarch: amd64
dockerfile: goreleaser-scratch.Dockerfile
image_templates:
- "savid/{{ .ProjectName }}:{{ .Version }}-amd64"
- "savid/{{ .ProjectName }}:latest-amd64"
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
dockerfile: goreleaser-scratch.Dockerfile
image_templates:
- "savid/{{ .ProjectName }}:{{ .Version }}-arm64v8"
- "savid/{{ .ProjectName }}:latest-arm64v8"
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
## Debian
- use: buildx
goos: linux
goarch: amd64
dockerfile: goreleaser-debian.Dockerfile
image_templates:
- "savid/{{ .ProjectName }}:{{ .Version }}-debian-amd64"
- "savid/{{ .ProjectName }}:debian-latest-amd64"
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
dockerfile: goreleaser-debian.Dockerfile
image_templates:
- "savid/{{ .ProjectName }}:{{ .Version }}-debian-arm64v8"
- "savid/{{ .ProjectName }}:debian-latest-arm64v8"
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--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:
## Scratch
- name_template: savid/{{ .ProjectName }}:{{ .Version }}
image_templates:
- savid/{{ .ProjectName }}:{{ .Version }}-amd64
- savid/{{ .ProjectName }}:{{ .Version }}-arm64v8
- name_template: savid/{{ .ProjectName }}:{{ .Version }}-arm64
image_templates:
- savid/{{ .ProjectName }}:{{ .Version }}-arm64v8
- name_template: savid/{{ .ProjectName }}:latest
image_templates:
- savid/{{ .ProjectName }}:latest-amd64
- savid/{{ .ProjectName }}:latest-arm64v8

## Debian
- name_template: savid/{{ .ProjectName }}:{{ .Version }}-debian
image_templates:
- savid/{{ .ProjectName }}:{{ .Version }}-debian-amd64
- savid/{{ .ProjectName }}:{{ .Version }}-debian-arm64v8
- name_template: savid/{{ .ProjectName }}:{{ .Version }}-debian-arm64
image_templates:
- savid/{{ .ProjectName }}:{{ .Version }}-debian-arm64v8
- name_template: savid/{{ .ProjectName }}:debian-latest
image_templates:
- savid/{{ .ProjectName }}:debian-latest-amd64
- savid/{{ .ProjectName }}:debian-latest-arm64v8
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-reco
ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /bin/app /ethereum-balance-metrics-exporter
ENTRYPOINT ["/ethereum-balance-metrics-exporter"]
COPY --from=builder /bin/app /ethereum-address-metrics-exporter
ENTRYPOINT ["/ethereum-address-metrics-exporter"]
Loading

0 comments on commit 5bc1f5d

Please sign in to comment.