Skip to content

Commit

Permalink
Workflow initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
reefland committed May 10, 2023
1 parent 33b6eb7 commit 1e43a42
Show file tree
Hide file tree
Showing 10 changed files with 395 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -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
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions .github/labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
area/github:
- ".github/**/*"
- ".gitignore"
area/README-update:
- "**/README.md"
47 changes: 47 additions & 0 deletions .github/labels.yaml
Original file line number Diff line number Diff line change
@@ -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
61 changes: 61 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -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
51 changes: 51 additions & 0 deletions .github/workflows/broken-link-check.yaml
Original file line number Diff line number Diff line change
@@ -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
57 changes: 57 additions & 0 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
26 changes: 26 additions & 0 deletions .github/workflows/meta-labeler.yaml
Original file line number Diff line number Diff line change
@@ -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 }}"
Loading

0 comments on commit 1e43a42

Please sign in to comment.