generated from ironcore-dev/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add empty Kubebuilder project and GitHub workflows (#1)
* Add empty Kubebuilder skeleton * Add GitHub workflows * Fix CI errors
- Loading branch information
Showing
41 changed files
with
1,815 additions
and
5 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,3 @@ | ||
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file | ||
# Ignore build and test binaries. | ||
bin/ |
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: Bug Report | ||
about: Report a bug | ||
labels: kind/bug | ||
|
||
--- | ||
|
||
**What happened**: | ||
|
||
**What you expected to happen**: | ||
|
||
**How to reproduce it (as minimally and precisely as possible)**: | ||
|
||
**Anything else we need to know**: | ||
|
||
**Environment**: |
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,10 @@ | ||
--- | ||
name: Enhancement Request | ||
about: Suggest an enhancement | ||
labels: kind/enhancement | ||
|
||
--- | ||
|
||
**What would you like to be added**: | ||
|
||
**Why is this needed**: |
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,26 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
commit-message: | ||
prefix: "" | ||
reviewers: | ||
- Gchbg | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
commit-message: | ||
prefix: "" | ||
reviewers: | ||
- Gchbg | ||
- package-ecosystem: docker | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
commit-message: | ||
prefix: "" | ||
reviewers: | ||
- Gchbg |
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 @@ | ||
**What this PR does / why we need it**: | ||
|
||
**Which issue(s) this PR fixes**: | ||
Fixes # | ||
|
||
**Special notes for your reviewer**: | ||
|
||
**Release note**: | ||
<!-- Write your release note: | ||
1. Enter your release note in the below block. | ||
2. If no release note is required, just write "NONE" within the block. | ||
Format of block header: <category> <target_group> | ||
Possible values: | ||
- category: breaking|feature|bugfix|doc|other | ||
- target_group: user|operator|developer|dependency | ||
--> | ||
```feature user | ||
``` |
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,49 @@ | ||
name-template: 'v$RESOLVED_VERSION' | ||
tag-template: 'v$RESOLVED_VERSION' | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- 'feature' | ||
- 'enhancement' | ||
- title: '🐛 Bug Fixes' | ||
labels: | ||
- 'fix' | ||
- 'bugfix' | ||
- 'bug' | ||
- title: '🧰 Maintenance' | ||
labels: | ||
- 'chore' | ||
- 'dependencies' | ||
- 'documentation' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
version-resolver: | ||
major: | ||
labels: | ||
- 'major' | ||
minor: | ||
labels: | ||
- 'minor' | ||
patch: | ||
labels: | ||
- 'patch' | ||
default: patch | ||
exclude-labels: | ||
- 'skip-changelog' | ||
autolabeler: | ||
- label: 'documentation' | ||
files: | ||
- '**/*.md' | ||
branch: | ||
- '/docs{0,1}\/.+/' | ||
- label: 'bug' | ||
branch: | ||
- '/fix\/.+/' | ||
title: | ||
- '/fix/i' | ||
- label: 'enhancement' | ||
branch: | ||
- '/feature\/.+/' | ||
template: | | ||
## Changes | ||
$CHANGES |
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 @@ | ||
name: Draft release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release-drafter: | ||
name: Draft release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Draft release | ||
uses: release-drafter/release-drafter@v6 | ||
with: | ||
disable-releaser: github.ref != 'refs/heads/main' | ||
config-name: release-drafter.yml | ||
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,19 @@ | ||
name: Lint | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Run linter | ||
uses: golangci/golangci-lint-action@v4 |
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,70 @@ | ||
name: Build and publish docker image | ||
|
||
env: | ||
platforms: linux/amd64,linux/arm64 | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
publish-docker: | ||
name: Build and publish Docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Collect metadata | ||
uses: docker/metadata-action@v5 | ||
id: meta | ||
with: | ||
images: | | ||
ghcr.io/${{ github.repository_owner }}/metal | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=tag | ||
type=ref,event=pr | ||
type=sha | ||
flavor: | | ||
latest=${{ github.ref == 'refs/heads/main' }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
image: tonistiigi/binfmt:latest | ||
platforms: ${{ env.platforms }} | ||
- name: Set up Docker Buildx context | ||
run: | | ||
docker context create builders | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
timeout-minutes: 5 | ||
with: | ||
version: latest | ||
endpoint: builders | ||
- name: Log in to GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
timeout-minutes: 60 | ||
with: | ||
context: . | ||
platforms: ${{ env.platforms }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: true |
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,13 @@ | ||
name: Check REUSE compliance | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
reuse: | ||
name: Check REUSE compliance | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Run REUSE | ||
uses: fsfe/reuse-action@v3 |
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,19 @@ | ||
name: Test | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Run tests | ||
run: make test |
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,27 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
bin/* | ||
Dockerfile.cross | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Go workspace file | ||
go.work | ||
|
||
# Kubernetes Generated files - skip generated files, except for vendored files | ||
!vendor/**/zz_generated.* | ||
|
||
# editor and IDE paraphernalia | ||
.idea | ||
.vscode | ||
*.swp | ||
*.swo | ||
*~ |
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,40 @@ | ||
run: | ||
deadline: 5m | ||
allow-parallel-runners: true | ||
|
||
issues: | ||
# don't skip warning about doc comments | ||
# don't exclude the default set of lint | ||
exclude-use-default: false | ||
# restore some of the defaults | ||
# (fill in the rest as needed) | ||
exclude-rules: | ||
- path: "api/*" | ||
linters: | ||
- lll | ||
- path: "internal/*" | ||
linters: | ||
- dupl | ||
- lll | ||
linters: | ||
disable-all: true | ||
enable: | ||
- dupl | ||
- errcheck | ||
- exportloopref | ||
- goconst | ||
- gocyclo | ||
- gofmt | ||
- goimports | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- lll | ||
- misspell | ||
- nakedret | ||
- prealloc | ||
- staticcheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: <YOUR-REPO-NAME> | ||
Upstream-Contact: <YOUR-CONTACT (MAIL ADDRESS ETC.)> | ||
Source: <https://github.com/ironcore-dev/YOUR-REPO-NAME> | ||
Upstream-Name: metal | ||
Upstream-Contact: IronCore authors <[email protected]> | ||
Source: https://github.com/ironcore-dev/metal | ||
Disclaimer: The code in this project may include calls to APIs ("API Calls") of | ||
SAP or third-party products or services developed outside of this project | ||
("External Products"). | ||
|
@@ -24,6 +24,21 @@ Disclaimer: The code in this project may include calls to APIs ("API Calls") of | |
you any rights to use or access any SAP External Product, or provide any third | ||
parties the right to use of access any SAP External Product, through API Calls. | ||
|
||
Files: <YOUR-FILE-OR-FOLDER-LIST> | ||
Copyright: <YEARS-RELEVANT-FOR-YOUR-PROJECT> SAP SE or an SAP affiliate company and <YOUR-PROJECT-NAME> contributors | ||
Files: | ||
.github/* | ||
cmd/* | ||
config/* | ||
hack/* | ||
test/* | ||
.dockerignore | ||
.gitignore | ||
.golangci.yml | ||
CONTRIBUTING.md | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
Makefile | ||
PROJECT | ||
README.md | ||
Copyright: 2024 SAP SE or an SAP affiliate company and IronCore contributors | ||
License: Apache-2.0 |
Oops, something went wrong.