diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..0b6b856 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,49 @@ +name: Bug Report +description: Create a report to help us improve +title: "Issue Title HERE" +labels: [bug] +assignees: + - reefland + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! Please be cautious with the sensitive information/logs while filing the issue. + - type: textarea + id: desc + attributes: + label: Describe the bug a clear and concise description of what the bug is. + validations: + required: true + + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Enter exactly what happened. + validations: + required: false + + - type: textarea + id: what-expected + attributes: + label: What you expected to happen? + description: Enter what you expected to happen. + validations: + required: false + + - type: textarea + id: how-to-reproduce + attributes: + label: How to reproduce it? + description: As minimally and precisely as possible. + validations: + required: false + + - type: textarea + id: anything-else + attributes: + label: Anything else we need to know? + validations: + required: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..4861936 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,45 @@ +name: Feature request +description: Suggest an idea for this project +title: "Feature Title HERE" +labels: [enhancement] +assignees: + - reefland + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this feature request! + + - type: textarea + id: desc + attributes: + label: Is your feature request related to a problem ? + description: Give a clear and concise description of what the problem is. + placeholder: ex. I'm always frustrated when [...] + validations: + required: true + + - type: textarea + id: prop-solution + attributes: + label: Describe the solution you'd like. + description: A clear and concise description of what you want to happen. + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered. + description: A clear and concise description of any alternative solutions or features you've considered. If nothing, please enter `NONE` + validations: + required: true + + - type: textarea + id: additional-ctxt + attributes: + label: Additional context. + description: Add any other context or screenshots about the feature request here. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 0000000..295f305 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,20 @@ +name: Question +description: Ask a question to the maintainer +title: "Question Title HERE" +labels: [question] +assignees: + - reefland + +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to ask a question! + + - type: textarea + id: desc + attributes: + label: Ask your question + description: Give a clear and concise query of what you want to ask. + validations: + required: true \ No newline at end of file diff --git a/.github/labeler.yaml b/.github/labeler.yaml new file mode 100644 index 0000000..c210fe6 --- /dev/null +++ b/.github/labeler.yaml @@ -0,0 +1,6 @@ +--- +area/github: + - ".github/**/*" + - ".gitignore" +area/README-update: + - "**/README.md" diff --git a/.github/labels.yaml b/.github/labels.yaml new file mode 100644 index 0000000..0e6747d --- /dev/null +++ b/.github/labels.yaml @@ -0,0 +1,47 @@ +--- +# Area +- name: area/github + color: "72ccf3" + description: >- + Changes made in the github directory +- name: area/README-update + color: "72ccf3" + description: >- + Changes made to a README.md file + + +# Uncategorized +- name: bug + color: "d73a4a" + description: >- + Something isn't working +- name: do-not-merge + color: "d73a4a" +- name: documentation + color: "0075ca" + description: >- + Improvements or additions to documentation +- name: duplicate + color: "cfd3d7" + description: >- + This issue or pull request already exists +- name: enhancement + color: "a2eeef" + description: >- + New feature or request +- name: help wanted + color: "008672" + description: >- + Extra attention is needed +- name: broken-links + color: "7B55D7" +- name: question + color: "d876e3" + description: >- + Further information is requested +- name: community + color: "0e8a16" +- name: wontfix + color: "ffffff" + description: >- + This will not be worked on diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml new file mode 100644 index 0000000..75fff00 --- /dev/null +++ b/.github/linters/.yaml-lint.yml @@ -0,0 +1,61 @@ +--- +######################################################################## +# Reference: https://yamllint.readthedocs.io/en/stable/rules.html # +# # +# These are the rules used for linting all the yaml files in the stack # +# NOTE: # +# You can disable line with: # +# # yamllint disable-line # +######################################################################## + +rules: + braces: + level: warning + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: 0 + max-spaces-inside-empty: 1 + brackets: + level: warning + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: 0 + max-spaces-inside-empty: 1 + colons: + level: warning + max-spaces-before: 0 + max-spaces-after: 1 + commas: + level: warning + max-spaces-before: 0 + min-spaces-after: 1 + max-spaces-after: 1 + comments: disable + comments-indentation: disable + document-end: disable + document-start: + level: warning + present: true + empty-lines: + level: warning + max: 2 + max-start: 0 + max-end: 1 + hyphens: + level: warning + max-spaces-after: 1 + indentation: + level: warning + spaces: consistent + indent-sequences: true + check-multi-line-strings: false + key-duplicates: enable + line-length: + level: warning + max: 100 + allow-non-breakable-words: true + allow-non-breakable-inline-mappings: true + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable diff --git a/.github/workflows/broken-link-check.yaml b/.github/workflows/broken-link-check.yaml new file mode 100644 index 0000000..807e709 --- /dev/null +++ b/.github/workflows/broken-link-check.yaml @@ -0,0 +1,51 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/softprops/github-actions-schemas/master/workflow.json +name: "Broken Link Check" + +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 0" + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + - name: Generate Token + uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0 + id: generate-token + with: + app_id: "${{ secrets.BOT_APP_ID }}" + private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" + + - name: Checkout + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + token: "${{ steps.generate-token.outputs.token }}" + + - name: Scan for broken links + uses: lycheeverse/lychee-action@97189f2c0a3c8b0cb0e704fd4e878af6e5e2b2c5 # v1.7.0 + id: lychee + env: + GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}" + with: + args: --verbose --no-progress --exclude-mail './**/*.md' + + - name: Find Link Checker Issue + id: broken-link-check-issue + uses: micalevisk/last-issue-action@305829d9728f47beb0029417167a0af890edfd6e # v2.1.0 + with: + state: open + labels: | + broken-links + + - name: Update Issue + uses: peter-evans/create-issue-from-file@433e51abf769039ee20ba1293a088ca19d573b7f # renovate: tag=v4.0.1 + with: + title: Broken links detected 🔗 + issue-number: "${{ steps.broken-link-check-issue.outputs.issue-number }}" + content-filepath: ./lychee/out.md + token: "${{ steps.generate-token.outputs.token }}" + labels: | + broken-links \ No newline at end of file diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml new file mode 100644 index 0000000..a874782 --- /dev/null +++ b/.github/workflows/linter.yaml @@ -0,0 +1,57 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/softprops/github-actions-schemas/master/workflow.json +name: Lint Code Base + +# +# Documentation: +# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions +# + +############################# +# Start the job on all push # +############################# +on: + push: + branches: ["main", "master"] + + pull_request: + branches: ["main", "master"] + +############### +# Set the Job # +############### +jobs: + build: + # Name the Job + name: Lint Code Base + # Set the agent to run on + runs-on: ubuntu-latest + + ################## + # Load all steps # + ################## + steps: + ########################## + # Checkout the code base # + ########################## + - name: Checkout Code + uses: actions/checkout@v3 + with: + # Full git history is needed to get a proper list of changed + # files within `super-linter` + fetch-depth: 0 + + ################################ + # Run Linter against code base # + ################################ + # https://github.com/marketplace/actions/super-linter + + - name: Lint Code Base + uses: github/super-linter/slim@v5 + env: + VALIDATE_ALL_CODEBASE: false + VALIDATE_JSCPD: false + KUBERNETES_KUBECONFORM_OPTIONS: "--ignore-missing-schemas" + # KUBERNETES_KUBECONFORM_OPTIONS: "-schema-location default -schema-location https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json" + DEFAULT_BRANCH: master + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/meta-labeler.yaml b/.github/workflows/meta-labeler.yaml new file mode 100644 index 0000000..721301e --- /dev/null +++ b/.github/workflows/meta-labeler.yaml @@ -0,0 +1,26 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/softprops/github-actions-schemas/master/workflow.json +name: "Meta Labeler" + +on: + workflow_dispatch: + pull_request: + branches: ["main", "master"] + +jobs: + labeler: + name: Labeler + runs-on: ubuntu-latest + steps: + - name: Generate Token + uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0 + id: generate-token + with: + app_id: "${{ secrets.BOT_APP_ID }}" + private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" + + - name: Labeler + uses: actions/labeler@ba790c862c380240c6d5e7427be5ace9a05c754b # v4.0.3 + with: + configuration-path: .github/labeler.yaml + repo-token: "${{ steps.generate-token.outputs.token }}" diff --git a/.github/workflows/meta-sync-labels.yaml b/.github/workflows/meta-sync-labels.yaml new file mode 100644 index 0000000..c82b559 --- /dev/null +++ b/.github/workflows/meta-sync-labels.yaml @@ -0,0 +1,33 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/softprops/github-actions-schemas/master/workflow.json +name: "Meta Sync labels" + +on: + workflow_dispatch: + push: + branches: ["main", "master"] + paths: [".github/labels.yaml"] + +jobs: + labels: + name: Sync Labels + runs-on: ubuntu-latest + steps: + - name: Generate Token + uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0 + id: generate-token + with: + app_id: "${{ secrets.BOT_APP_ID }}" + private_key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" + + - name: Checkout + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + token: "${{ steps.generate-token.outputs.token }}" + + - name: Sync Labels + uses: EndBug/label-sync@da00f2c11fdb78e4fae44adac2fdd713778ea3e8 # renovate: tag=v2.3.2 + with: + config-file: .github/labels.yaml + token: "${{ steps.generate-token.outputs.token }}" + delete-other-labels: true