Skip to content

Commit bf203b3

Browse files
committed
init: init
Signed-off-by: Neko Ayaka <neko@ayaka.moe>
0 parents  commit bf203b3

91 files changed

Lines changed: 13402 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
2+
# Ignore build and test binaries.
3+
bin/
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Release Build
2+
3+
on:
4+
push:
5+
tags:
6+
- '**'
7+
workflow_dispatch:
8+
9+
jobs:
10+
# hub_build:
11+
# name: Build for Docker Hub
12+
# runs-on: ubuntu-latest
13+
# steps:
14+
# - uses: actions/checkout@v3
15+
16+
# - name: Fetch version
17+
# id: version
18+
# run: |
19+
# export LAST_TAGGED_COMMIT=$(git rev-list --tags --max-count=1)
20+
# export LAST_TAG=$(git describe --tags $LAST_TAGGED_COMMIT)
21+
# echo "version=${LAST_TAG#v}" >> $GITHUB_OUTPUT
22+
23+
# - name: Set up Docker Buildx
24+
# uses: docker/setup-buildx-action@v2
25+
# with:
26+
# platforms: linux/amd64,linux/arm64
27+
28+
# - name: Sign in to Docker Hub
29+
# uses: docker/login-action@v2
30+
# with:
31+
# username: ${{ github.repository_owner }}
32+
# password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
33+
34+
# - name: Create image tags
35+
# id: dockerinfo
36+
# run: |
37+
# echo "taglatest=${{ github.repository_owner }}/insights-bot:latest" >> $GITHUB_OUTPUT
38+
# echo "tag=${{ github.repository_owner }}/insights-bot:${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT
39+
40+
# - name: Build and Push
41+
# uses: docker/build-push-action@v4
42+
# with:
43+
# context: ./
44+
# file: ./Dockerfile
45+
# push: true
46+
# no-cache: false
47+
# tags: |
48+
# ${{ steps.dockerinfo.outputs.taglatest }}
49+
# ${{ steps.dockerinfo.outputs.tag }}
50+
51+
ghcr_build:
52+
name: Build for GitHub Container Registry
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v3
56+
57+
- name: Fetch version
58+
id: version
59+
run: |
60+
export LAST_TAGGED_COMMIT=$(git rev-list --tags --max-count=1)
61+
export LAST_TAG=$(git describe --tags $LAST_TAGGED_COMMIT)
62+
echo "version=${LAST_TAG#v}" >> $GITHUB_OUTPUT
63+
64+
- name: Set up Docker Buildx
65+
uses: docker/setup-buildx-action@v2
66+
with:
67+
platforms: linux/amd64,linux/arm64
68+
69+
- name: Sign in to GitHub Container Registry
70+
uses: docker/login-action@v2
71+
with:
72+
registry: ghcr.io
73+
username: ${{ github.repository_owner }}
74+
password: ${{ secrets.GITHUB_TOKEN }}
75+
76+
- name: Create image tags
77+
id: dockerinfo
78+
run: |
79+
echo "taglatest=ghcr.io/${{ github.repository }}:latest" >> $GITHUB_OUTPUT
80+
echo "tag=ghcr.io/${{ github.repository }}:${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT
81+
82+
- name: Build and Push
83+
uses: docker/build-push-action@v4
84+
with:
85+
context: ./
86+
file: ./Dockerfile
87+
push: true
88+
no-cache: false
89+
tags: |
90+
${{ steps.dockerinfo.outputs.taglatest }}
91+
${{ steps.dockerinfo.outputs.tag }}
92+

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
bin/*
8+
Dockerfile.cross
9+
10+
# Test binary, built with `go test -c`
11+
*.test
12+
13+
# Output of the go coverage tool, specifically when used with LiteIDE
14+
*.out
15+
16+
# Go workspace file
17+
go.work
18+
19+
# Kubernetes Generated files - skip generated files, except for vendored files
20+
!vendor/**/zz_generated.*
21+
22+
# editor and IDE paraphernalia
23+
.idea
24+
!.vscode/settings.json
25+
*.swp
26+
*.swo
27+
*~
28+
29+
# Node.js related
30+
.eslintcache
31+
.npmrc
32+
node_modules/
33+
34+
# Vite.js related
35+
.temp
36+
.vite-inspect
37+
38+
# Vitepress related
39+
**/.vitepress/dist/
40+
**/.vitepress/cache/
41+
42+
# Netlify related
43+
**/.netlify/*
44+
**/.netlify/functions-serve/*

.golangci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
run:
2+
allow-parallel-runners: true
3+
4+
issues:
5+
exclude:
6+
- "if statements should only be cuddled with assignments" # from wsl
7+
- "if statements should only be cuddled with assignments used in the if statement itself" # from wsl
8+
- "assignments should only be cuddled with other assignments" # from wsl. false positive case: var a bool\nb := true
9+
- "declarations should never be cuddled" # from wsl
10+
# don't skip warning about doc comments
11+
# don't exclude the default set of lint
12+
exclude-use-default: false
13+
# restore some of the defaults
14+
# (fill in the rest as needed)
15+
exclude-rules:
16+
- path: internal/*
17+
linters:
18+
- dupl
19+
20+
linters-settings:
21+
wsl:
22+
allow-assign-and-call: false
23+
strict-append: false
24+
revive:
25+
rules:
26+
- name: blank-imports
27+
disabled: true
28+
29+
linters:
30+
disable-all: true
31+
enable:
32+
- dupl
33+
- errcheck
34+
- exportloopref
35+
- goconst
36+
- gocyclo
37+
- gofmt
38+
- goimports
39+
- gosimple
40+
- govet
41+
- ineffassign
42+
# - lll
43+
- misspell
44+
- nakedret
45+
- prealloc
46+
- staticcheck
47+
- typecheck
48+
- unconvert
49+
- unparam
50+
- unused
51+
- containedctx
52+
- durationcheck
53+
- errname
54+
- exhaustive
55+
- forcetypeassert
56+
- goheader
57+
- goprintffuncname
58+
# - gosec
59+
- musttag
60+
- nestif
61+
- nolintlint
62+
- nosprintfhostport
63+
- predeclared
64+
- reassign
65+
- revive
66+
- tenv
67+
- testableexamples
68+
- whitespace
69+
- wsl

.vscode/settings.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"cSpell.words": [
3+
"alices",
4+
"apiextensions",
5+
"cainjection_in_models",
6+
"certmanager",
7+
"clientgoscheme",
8+
"clusterrole",
9+
"clusterrolebinding",
10+
"containedctx",
11+
"corev1",
12+
"crdkustomizecainjectionpatch",
13+
"crdkustomizeresource",
14+
"crdkustomizewebhookpatch",
15+
"deepcopy",
16+
"dupl",
17+
"durationcheck",
18+
"envtest",
19+
"errcheck",
20+
"errname",
21+
"exportloopref",
22+
"finalizers",
23+
"forcetypeassert",
24+
"goconst",
25+
"gocyclo",
26+
"gofmt",
27+
"goheader",
28+
"goimports",
29+
"gomega",
30+
"goprintffuncname",
31+
"gosec",
32+
"gosimple",
33+
"govet",
34+
"healthz",
35+
"ineffassign",
36+
"kubebuilder",
37+
"kubebuilder:subresource",
38+
"kustomization",
39+
"kustomize",
40+
"kustomizeconfig",
41+
"manifestskustomizesamples",
42+
"metav1",
43+
"metricsserver",
44+
"musttag",
45+
"nakedret",
46+
"nestif",
47+
"nolint",
48+
"nolintlint",
49+
"nosprintfhostport",
50+
"OIDC",
51+
"ollama",
52+
"ollamav1",
53+
"onsi",
54+
"prealloc",
55+
"predeclared",
56+
"readyz",
57+
"rolebinding",
58+
"servicemonitor",
59+
"staticcheck",
60+
"subresource",
61+
"tenv",
62+
"testableexamples",
63+
"unconvert",
64+
"unparam",
65+
"utilruntime",
66+
"webhookcainjection_patch",
67+
"persistentvolumeclaims",
68+
"storageclasses",
69+
"persistentvolumes",
70+
"batchv1",
71+
"intstr",
72+
"appsv1",
73+
"printcolumn",
74+
"Eventf",
75+
"AnnotatedEventf",
76+
"asciinema"
77+
],
78+
"editor.formatOnSave": false,
79+
"editor.codeActionsOnSave": {
80+
"source.fixAll.eslint": "explicit",
81+
"source.organizeImports": "never"
82+
},
83+
// Enable the ESlint flat config support
84+
"eslint.experimental.useFlatConfig": true,
85+
// The following is optional.
86+
// It's better to put under project setting `.vscode/settings.json`
87+
// to avoid conflicts with working with different eslint configs
88+
// that does not support all formats.
89+
"eslint.validate": [
90+
"javascript",
91+
"javascriptreact",
92+
"typescript",
93+
"typescriptreact",
94+
"vue",
95+
"json",
96+
"jsonc",
97+
],
98+
}

0 commit comments

Comments
 (0)