Skip to content

Commit 40817ff

Browse files
committed
Initial commit with latest code
0 parents  commit 40817ff

Some content is hidden

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

55 files changed

+4690
-0
lines changed

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
version: 2
3+
updates:
4+
5+
- package-ecosystem: gomod
6+
directory: "/"
7+
schedule:
8+
interval: weekly
9+
open-pull-requests-limit: 10
10+
groups:
11+
gomod:
12+
update-types:
13+
- "patch"
14+
15+
- package-ecosystem: "github-actions"
16+
directory: "/"
17+
schedule:
18+
interval: weekly
19+
open-pull-requests-limit: 10
20+
groups:
21+
actions:
22+
update-types:
23+
- "minor"
24+
- "patch"

.github/workflows/ci.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
ci:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
15+
16+
- name: Setup Go
17+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
18+
with:
19+
go-version-file: ./go.mod
20+
check-latest: true
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
27+
28+
- name: Install GoReleaser
29+
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
30+
with:
31+
install-only: true
32+
33+
- name: Install cosign
34+
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
35+
36+
- name: Install syft
37+
uses: anchore/sbom-action/download-syft@fc46e51fd3cb168ffb36c6d1915723c47db58abb # v0.17.7
38+
39+
- uses: chainguard-dev/actions/goimports@main
40+
41+
- name: Run Mage
42+
uses: magefile/mage-action@6a5dcb5fe61f43d7c08a98bc3cf9bc63c308c08e # v3.0.0
43+
with:
44+
args: -v ci
45+
46+
check-docs:
47+
name: check-docs
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
51+
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
52+
with:
53+
go-version-file: ./go.mod
54+
check-latest: true
55+
56+
- name: generate docs
57+
run: |
58+
go build -o cr-bin ./cr/main.go
59+
./cr-bin doc-gen
60+
git_status="$(git status --porcelain)"
61+
if [[ ${git_status} ]]; then
62+
echo -e 'Documentation is outdated. Please update the docs\n'
63+
echo "${git_status}"
64+
exit 1
65+
fi
66+
67+
golangci:
68+
name: lint
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
72+
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
73+
with:
74+
go-version-file: ./go.mod
75+
check-latest: true
76+
- name: golangci-lint
77+
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
78+
with:
79+
version: v1.59

.github/workflows/release.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
id-token: write
14+
contents: write
15+
packages: write
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup Go
24+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
25+
with:
26+
go-version-file: ./go.mod
27+
check-latest: true
28+
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
34+
35+
- name: Install GoReleaser
36+
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6.1.0
37+
with:
38+
install-only: true
39+
40+
- name: Install cosign
41+
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
42+
43+
- name: Install syft
44+
uses: anchore/sbom-action/download-syft@fc46e51fd3cb168ffb36c6d1915723c47db58abb # v0.17.7
45+
46+
- name: Cache
47+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
48+
with:
49+
path: ~/go/pkg/mod
50+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
51+
restore-keys: |
52+
${{ runner.os }}-go-
53+
54+
- uses: chainguard-dev/actions/goimports@main
55+
56+
- name: Login to registry
57+
if: github.repository == 'helm/chart-releaser'
58+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
59+
with:
60+
registry: quay.io
61+
username: ${{ secrets.DOCKER_USERNAME }}
62+
password: ${{ secrets.DOCKER_PASSWORD }}
63+
64+
- name: Run Mage
65+
uses: magefile/mage-action@6a5dcb5fe61f43d7c08a98bc3cf9bc63c308c08e # v3.0.0
66+
with:
67+
args: -v release
68+
env:
69+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
chart-releaser
2+
.idea
3+
/dist
4+
/vendor
5+
.vscode
6+
/cr-bin

.golangci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
linters:
2+
enable:
3+
- asciicheck
4+
- errcheck
5+
- errorlint
6+
- gofmt
7+
- goimports
8+
- gosec
9+
- gocritic
10+
- importas
11+
- prealloc
12+
- revive
13+
- misspell
14+
- stylecheck
15+
- unconvert
16+
- unused
17+
- whitespace
18+
output:
19+
uniq-by-line: false
20+
issues:
21+
exclude-rules:
22+
- path: _test\.go
23+
linters:
24+
- errcheck
25+
- gosec
26+
max-issues-per-linter: 0
27+
max-same-issues: 0
28+
run:
29+
issues-exit-code: 1
30+
timeout: 10m

0 commit comments

Comments
 (0)