Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-ltc authored Mar 26, 2024
0 parents commit 51206e5
Show file tree
Hide file tree
Showing 13 changed files with 584 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = false
max_line_length = 120
tab_width = 4

[*.cue]
tab_width = 2

[{*.bash,*.sh,*.zsh}]
indent_size = 2
tab_width = 2

[{*.go,*.go2}]
indent_style = tab

[{*.yaml,*.yml}]
indent_size = 2
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#creating-issue-forms
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
name: Bug Report
description: Create a report to help KDP to improve
title: "[Bug]:"
labels:
- bug

body:
- type: markdown
attributes:
value: |
Thanks for your interest in KDP! 🚀
Please follow these instructions, fill every question, and do every step. 🙏
- type: input
id: KDP-version
attributes:
label: KDP version
description: |
What version of KDP are you using?
placeholder: ex. KDP :0.0.1
validations:
required: true

- type: textarea
id: what-did-you-do
attributes:
label: "What did you do?"
description: "If possible, provide a recipe for reproducing the error. A complete procedure is good."
validations:
required: true

- type: textarea
id: actual-behavior
attributes:
label: "What did you see happen?"
description: The interface where the error occurred, the error message, and so on can describe the exception condition of the error
validations:
required: true

- type: textarea
id: expected-behavior
attributes:
label: "What did you expect to see?"
description: Why is the current output incorrect, and any additional context we may need to understand the issue.
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Questions
about: Please use one of the forums for questions or general discussions
url: https://github.com/linktimecloud/template-project/pulls
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#creating-issue-forms
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
name: Feature Request
description: Suggest an idea for this project
title: "[Feature]:"
labels:
- enhancement

body:
- type: markdown
attributes:
value: |
Thanks for helping us improve! 🙏 Please answer these questions and provide as much information as possible about your problem.
- type: textarea
id: implemented-function
attributes:
label: "Implemented function"
description: "Describe the function to be implemented. If yes, describe the scope and scenario of the function in detail."
validations:
required: true

- type: textarea
id: problem-solve
attributes:
label: "What problem to solve?"
description: Describe what problem does this feature solve.
validations:
required: true

- type: textarea
id: version-completed
attributes:
label: "What version is expected to be completed?"
description: Expect it to be resolved in which version.
validations:
required: true
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
### Before you open your PR
- [Signed-off your commits](https://github.com/apps/dco/) (otherwise the DCO check will fail).
- Used [a conventional commit message](https://www.conventionalcommits.org/en/v1.0.0/).
### When you open your PR
- PR title format should also conform to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).
- "Fixes #" is in both the PR title (for release notes) and this description (to automatically link and close the issue).
- Create the PR as draft.
- Once builds are green, mark your PR "Ready for review".
When changes are requested, please address them and then dismiss the review to get it reviewed again.
-->

### Description of your changes

<!-- Does this PR fix an issue -->
Fixes #TODO

<!-- TODO: Say why you made your changes. -->
<!-- TODO: Attach screenshots if you changed the UI. -->

### How has this code been tested
<!-- TODO: Say how you tested your changes. -->

24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
commit-message:
prefix: "Chore: "
include: "scope"
ignore:
- dependency-name: k8s.io/*
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "Chore: "
include: "scope"
10 changes: 10 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"LABEL": {
"name": "title-needs-formatting",
"color": "EEEEEE"
},
"CHECKS": {
"prefixes": ["Fix: ", "Feat: ", "Docs: ", "Test: ", "Chore: ", "CI: ", "Perf: ", "Refactor: ", "Revert: ", "Style: ", "Test: ",
"Fix(", "Feat(", "Docs(", "Test(", "Chore(", "CI(", "Perf(", "Refactor(", "Revert(", "Style(", "Test(", "[Backport"]
}
}
46 changes: 46 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: CI-Build

on:
push:
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*

jobs:
build-docker-images:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Get the version
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Get image registry
id: get_image_registry
run: |
echo "IMG_REGISTRY=${{ secrets.NX_ALIYUN_REGISTRY }}" >> $GITHUB_OUTPUT
# - name: Docker Login
# uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
# with:
# registry: ${{ secrets.NX_ALIYUN_REGISTRY }}
# username: ${{ secrets.NX_ALIYUN_USERNAME }}
# password: ${{ secrets.NX_ALIYUN_PASSWORD }}

# - name: Build Images
# run: make docker-build-apiserver IMG_REGISTRY=${{ steps.get_image_registry.outputs.IMG_REGISTRY }} VERSION=${{ steps.get_version.outputs.VERSION }}
#
# - name: Push Images
# run: make docker-push-apiserver IMG_REGISTRY=${{ steps.get_image_registry.outputs.IMG_REGISTRY }} VERSION=${{ steps.get_version.outputs.VERSION }}


24 changes: 24 additions & 0 deletions .github/workflows/pr-title-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: PR Title Checker
on:
pull_request:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled

permissions:
pull-requests: write
contents: write
repository-projects: write

jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: thehanimo/pr-title-checker@v1.4.2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: true
configuration_path: ".github/pr-title-checker-config.json"
62 changes: 62 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Unit-Test

on:
push:
branches:
- main
- release-*
workflow_dispatch: {}
pull_request:
branches:
- main
- release-*

permissions:
contents: read

env:
# Common versions
GO_VERSION: "1.21"

jobs:
detect-noop:
permissions:
actions: write # for fkirc/skip-duplicate-actions to skip or stop workflow runs
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
continue-on-error: true

unit-tests:
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'

steps:
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out code into the Go module directory
uses: actions/checkout@cd7d8d697e10461458bc61a30d094dc601a8b017
with:
submodules: true

- name: Cache Go Dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-

# - name: Run Make test
# run: make test
73 changes: 73 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Node artifact files
node_modules/
dist/

# Compiled Java class files
*.class

# Compiled Python bytecode
*.py[cod]

# Log files
*.log
logs

# Package files

# Maven
target/

# Editor and IDE
.idea/
*.iml
.vscode
*.swp
*.swo
*~

# Unit test reports
TEST*.xml

# Generated by MacOS
.DS_Store

# Generated by Windows
Thumbs.db

# Applications
*.exe
*.war
*.tgz
*.tar
*.gz
*.zip

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv

# Excel
*.xlsx

# VirtualEnv
venv*/

# Binaries for programs and plugins
*.exe~
*.dll
*.so
*.dylib
bin

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Kubernetes Generated files - skip generated files, except for vendored files
!vendor/**/zz_generated.*
Loading

0 comments on commit 51206e5

Please sign in to comment.