-
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 c1591ae
Showing
28 changed files
with
1,745 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 @@ | ||
*.warc.gz filter=lfs diff=lfs merge=lfs -text |
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 @@ | ||
--- | ||
name: Bug Report | ||
about: Create a bug report to help us improve | ||
labels: "bug" | ||
--- | ||
|
||
**Bug Report** | ||
|
||
<!-- | ||
A clear and concise description of what the bug is. | ||
--> | ||
|
||
**To Reproduce** | ||
|
||
```shell | ||
# A standalone program is preferred | ||
``` | ||
|
||
**Expected Behavior** | ||
|
||
<!-- | ||
What was the expected behavior of the program? Was it supposed to exit without errors or | ||
do something else? | ||
--> | ||
|
||
**Actual Behavior** | ||
|
||
<!-- | ||
What actually happened? Please add any relevant output in this section | ||
--> | ||
|
||
**Your Environment** | ||
|
||
<!-- This could include, operating system, version of the software, etc--> |
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,17 @@ | ||
--- | ||
name: Feature request | ||
about: Propose a new feature | ||
labels: "feature" | ||
--- | ||
|
||
**Motivation** | ||
|
||
<!-- | ||
Please explain the rationale for adding the feature. Do you have a scenario that illustrates your needs? | ||
--> | ||
|
||
**Feature** | ||
|
||
<!-- | ||
A short description of the feature. | ||
--> |
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,31 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
labels: | ||
- "dependencies" | ||
commit-message: | ||
prefix: "build" | ||
include: "scope" | ||
|
||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
labels: | ||
- "dependencies" | ||
commit-message: | ||
prefix: "build" | ||
include: "scope" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
labels: | ||
- "dependencies" | ||
commit-message: | ||
prefix: "build" | ||
include: "scope" |
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,51 @@ | ||
name: Main | ||
on: push | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21" | ||
cache: false | ||
- name: Build | ||
run: "go build ./..." | ||
- name: Test | ||
run: "go test ./..." | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21" | ||
cache: false | ||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.55.1 | ||
args: --config=.golangci.yaml | ||
codeqL-build: | ||
name: CodeQL build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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,48 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+**" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build: | ||
name: Create and release docker image | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Extract metadata (tags, labels, version) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
- name: Log in to the container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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 @@ | ||
/fai |
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,118 @@ | ||
output: | ||
format: github-actions | ||
print-issued-lines: true | ||
print-linter-name: true | ||
uniq-by-line: true | ||
sort-results: true | ||
|
||
linters-settings: | ||
gofmt: | ||
simplify: true | ||
|
||
issues: | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 | ||
|
||
severity: | ||
case-sensitive: true | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
# TODO(https://github.com/nlnwa/go_container/issues/3): The following | ||
# sub-linters should be evaluated if they are going to be enabled or not. | ||
- asasalint | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
- containedctx | ||
- cyclop | ||
- deadcode | ||
- decorder | ||
- depguard | ||
- dogsled | ||
- dupl | ||
- dupword | ||
- errchkjson | ||
- execinquery | ||
- exhaustive | ||
- exhaustivestruct | ||
- exhaustruct | ||
- exportloopref | ||
- forbidigo | ||
- forcetypeassert | ||
- funlen | ||
- gci | ||
- ginkgolinter | ||
- gocheckcompilerdirectives | ||
- gochecknoglobals | ||
- gochecknoinits | ||
- gocognit | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- godot | ||
- godox | ||
- goerr113 | ||
- gofumpt | ||
- goheader | ||
- goimports | ||
- golint | ||
- gomnd | ||
- gomoddirectives | ||
- gomodguard | ||
- goprintffuncname | ||
- gosec | ||
- gosmopolitan | ||
- grouper | ||
- ifshort | ||
- importas | ||
- interfacebloat | ||
- interfacer | ||
- ireturn | ||
- lll | ||
- loggercheck | ||
- maintidx | ||
- makezero | ||
- maligned | ||
- mirror | ||
- misspell | ||
- musttag | ||
- nakedret | ||
- nestif | ||
- nilerr | ||
- nilnil | ||
- nlreturn | ||
- noctx | ||
- nolintlint | ||
- nonamedreturns | ||
- nosnakecase | ||
- nosprintfhostport | ||
- paralleltest | ||
- prealloc | ||
- predeclared | ||
- promlinter | ||
- reassign | ||
- revive | ||
- rowserrcheck | ||
- scopelint | ||
- sqlclosecheck | ||
- structcheck | ||
- stylecheck | ||
- tagalign | ||
- tagliatelle | ||
- tenv | ||
- testableexamples | ||
- testpackage | ||
- thelper | ||
- tparallel | ||
- unconvert | ||
- unparam | ||
- usestdlibvars | ||
- varcheck | ||
- varnamelen | ||
- wastedassign | ||
- whitespace | ||
- wrapcheck | ||
- wsl | ||
- zerologlint |
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,20 @@ | ||
FROM golang:1.21 AS build | ||
|
||
WORKDIR /go/src/app | ||
|
||
COPY go.mod go.sum ./ | ||
|
||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "-s -w" . | ||
|
||
|
||
FROM gcr.io/distroless/static-debian12:latest | ||
|
||
COPY --from=build /go/src/app/fai /fai | ||
|
||
EXPOSE 8081 | ||
|
||
ENTRYPOINT ["/fai"] |
Oops, something went wrong.