-
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
1 parent
4dda176
commit 347db04
Showing
7 changed files
with
317 additions
and
1 deletion.
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,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
target-branch: "main" |
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,16 @@ | ||
name: Build and Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
jobs: | ||
build: | ||
uses: NaturalSelectionLabs/Daedalus/.github/workflows/docker-tpl.yaml@main | ||
with: | ||
images: rss3/geth-exporter | ||
context: . | ||
dockerfile: ./Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
secrets: inherit |
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,21 @@ | ||
name: Lint | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.21" | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: GolangCI Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.55.2 |
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,25 @@ | ||
FROM rss3/go-builder as base | ||
|
||
WORKDIR /app | ||
|
||
RUN --mount=type=cache,target=/go/pkg/mod/ \ | ||
--mount=type=bind,source=go.sum,target=go.sum \ | ||
--mount=type=bind,source=go.mod,target=go.mod \ | ||
go mod download -x | ||
|
||
COPY . . | ||
|
||
FROM base AS builder | ||
|
||
ENV CGO_ENABLED=0 | ||
RUN --mount=type=cache,target=/go/pkg/mod/ \ | ||
go build cmd/main.go | ||
|
||
FROM rss3/go-runtime AS runner | ||
|
||
|
||
COPY --from=builder /root/gi/main /bin/geth-exporter | ||
|
||
EXPOSE 8000 | ||
USER nobody | ||
ENTRYPOINT ["/bin/geth-exporter"] |
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
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,32 @@ | ||
run: | ||
timeout: 10m | ||
|
||
linters: | ||
enable: | ||
# Enabled by default | ||
- errcheck | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- unused | ||
# Disabled by default | ||
- asasalint | ||
- asciicheck | ||
- bodyclose | ||
- errorlint | ||
- gci | ||
- gocyclo | ||
- gosec | ||
- makezero | ||
- noctx | ||
- paralleltest | ||
- prealloc | ||
- reassign | ||
- revive | ||
- whitespace | ||
- wsl | ||
|
||
issues: | ||
max-issues-per-linter: 0 # Unlimited | ||
max-same-issues: 0 # Unlimited |