-
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 cacbf53
Showing
12 changed files
with
5,081 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,33 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- '**' | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.15 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Docker Login | ||
if: success() && startsWith(github.ref, 'refs/tags/v') | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
run: | | ||
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
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,46 @@ | ||
project_name: tokenexporter | ||
|
||
builds: | ||
- id: linux-amd64 | ||
main: ./tokenexporter | ||
binary: tokenexporter | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
flags: | ||
- -v | ||
- -trimpath | ||
ldflags: | ||
- -s -w | ||
|
||
snapshot: | ||
name_template: "{{.Tag}}-snapshot" | ||
|
||
archives: | ||
- name_template: "{{ tolower .ProjectName }}-{{ tolower .Os }}-{{ tolower .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" | ||
format: binary | ||
|
||
dockers: | ||
- | ||
binaries: | ||
- tokenexporter | ||
builds: | ||
- linux-amd64 | ||
goos: "linux" | ||
goarch: "amd64" | ||
image_templates: | ||
- "ethersphere/tokenexporter:{{ .Major }}" | ||
- "ethersphere/tokenexporter:{{ .Major }}.{{ .Minor }}" | ||
- "ethersphere/tokenexporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}" | ||
- "ethersphere/tokenexporter:latest" | ||
dockerfile: Dockerfile.goreleaser | ||
build_flag_templates: | ||
- "--pull" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.title={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
extra_files: | ||
- data/addresses.txt | ||
- data/tokens.json |
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,34 @@ | ||
FROM golang:1.15 AS build | ||
|
||
WORKDIR /src | ||
# enable modules caching in separate layer | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
COPY . ./ | ||
|
||
RUN go build -trimpath -ldflags "-s -w" -o dist/tokenexporter ./tokenexporter | ||
|
||
FROM debian:10.2-slim AS runtime | ||
|
||
ENV PORT 9891 | ||
ENV DATA /app | ||
|
||
RUN mkdir -p /app && chown nobody:nogroup /app | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates; \ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/*; | ||
|
||
COPY --from=build /src/dist/tokenexporter /usr/local/bin/tokenexporter | ||
COPY data/addresses.txt /app/addresses.txt | ||
COPY data/tokens.json /app/tokens.json | ||
|
||
USER nobody | ||
VOLUME /app | ||
WORKDIR /app | ||
|
||
ENTRYPOINT ["tokenexporter"] |
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,23 @@ | ||
FROM debian:10.2-slim | ||
|
||
ENV PORT 9891 | ||
ENV DATA /app | ||
|
||
RUN mkdir -p /app && chown nobody:nogroup /app | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates; \ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/*; | ||
|
||
COPY tokenexporter /usr/local/bin/tokenexporter | ||
COPY ./data/addresses.txt /app/addresses.txt | ||
COPY ./data/tokens.json /app/tokens.json | ||
|
||
USER nobody | ||
VOLUME /app | ||
WORKDIR /app | ||
|
||
ENTRYPOINT ["tokenexporter"] |
Large diffs are not rendered by default.
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,6 @@ | ||
bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98 | ||
etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819 | ||
kraken:0xe853c56864a2ebe4576a807d26fdc4a0ada51919 | ||
kraken2:0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0 | ||
vitalik:0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B | ||
exchange:0x1db3439a222c519ab44bb1144fc28167b4fa6ee6 |
Oops, something went wrong.