mirror of
https://github.com/nestriness/cli.git
synced 2025-12-14 13:05:36 +02:00
✨ feat(gh): Initialize github workflows (#1)
This commit is contained in:
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* @wanjohiryan
|
||||||
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: 'github-actions'
|
||||||
|
directory: '/'
|
||||||
|
schedule:
|
||||||
|
interval: 'weekly'
|
||||||
|
labels:
|
||||||
|
- 'type/build'
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "*"
|
||||||
|
update-types: ["version-update:semver-patch"]
|
||||||
119
.github/labeler.yml
vendored
Normal file
119
.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
version: 2
|
||||||
|
labels:
|
||||||
|
- label: 'type/chore'
|
||||||
|
branch: '^chore/.*'
|
||||||
|
title: '^\s*.*?\schore(?:(.+))?!?:'
|
||||||
|
|
||||||
|
- label: 'type/fix'
|
||||||
|
branch: '^fix/.*'
|
||||||
|
title: '^\s*.*?\sfix(?:(.+))?!?:'
|
||||||
|
|
||||||
|
- label: 'type/feat'
|
||||||
|
branch: '^feat/.*'
|
||||||
|
title: '^\s*.*?\sfeat(?:(.+))?!?:'
|
||||||
|
|
||||||
|
- label: 'type/breaking'
|
||||||
|
body: '(?i)breaking.*'
|
||||||
|
|
||||||
|
- label: 'type/docs'
|
||||||
|
branch: '^docs/.*'
|
||||||
|
title: '^\s*.*?\sdocs(?:(.+))?!?:'
|
||||||
|
branch: '^docs/.*'
|
||||||
|
files:
|
||||||
|
- '**/*.md$'
|
||||||
|
- '**/*.mdx$'
|
||||||
|
|
||||||
|
- label: 'type/ci'
|
||||||
|
branch: '^ci/.*'
|
||||||
|
title: '^\s*.*?\sci(?:(.+))?!?:'
|
||||||
|
files:
|
||||||
|
- '.github/.+'
|
||||||
|
|
||||||
|
- label: 'type/build'
|
||||||
|
branch: '^dependabot/.*'
|
||||||
|
title: '^\s*.*?\sbuild(?:(.+))?!?:'
|
||||||
|
|
||||||
|
- label: 'type/perf'
|
||||||
|
title: '^\s*.*?\sperf(?:(.+))?!?:'
|
||||||
|
|
||||||
|
- label: 'mergeable/false'
|
||||||
|
mergeable: False
|
||||||
|
|
||||||
|
- label: 'usr/dependabot'
|
||||||
|
branch: '^dependabot/.*'
|
||||||
|
authors:
|
||||||
|
- 'dependabot[bot]'
|
||||||
|
|
||||||
|
- label: 'scope/back-end'
|
||||||
|
files:
|
||||||
|
- 'server.Dockerfile'
|
||||||
|
|
||||||
|
- label: 'scope/base'
|
||||||
|
files:
|
||||||
|
- 'base.Dockerfile'
|
||||||
|
|
||||||
|
- label: 'scope/ffmpeg'
|
||||||
|
files:
|
||||||
|
- 'ffmpeg.Dockerfile'
|
||||||
|
|
||||||
|
- label: 'scope/recorder'
|
||||||
|
files:
|
||||||
|
- 'recorder.Dockerfile'
|
||||||
|
|
||||||
|
- label: 'scope/relay'
|
||||||
|
files:
|
||||||
|
- 'relay.Dockerfile'
|
||||||
|
|
||||||
|
- label: 'scope/front-end'
|
||||||
|
files:
|
||||||
|
- 'apps/www/.+'
|
||||||
|
|
||||||
|
- label: 'pkg/www'
|
||||||
|
files:
|
||||||
|
- 'apps/www/.+'
|
||||||
|
|
||||||
|
- label: 'scope/git'
|
||||||
|
files:
|
||||||
|
- '**/.gitignore$'
|
||||||
|
- '.github/.+'
|
||||||
|
|
||||||
|
- label: "size/xs"
|
||||||
|
size:
|
||||||
|
below: 10
|
||||||
|
exclude-files: ["pnpm-lock.yml","yarn.lock"]
|
||||||
|
|
||||||
|
- label: "size/s"
|
||||||
|
size:
|
||||||
|
above: 9
|
||||||
|
below: 100
|
||||||
|
exclude-files: ["pnpm-lock.yml","yarn.lock"]
|
||||||
|
|
||||||
|
- label: "size/m"
|
||||||
|
size:
|
||||||
|
above: 49
|
||||||
|
below: 200
|
||||||
|
exclude-files: ["pnpm-lock.yml","yarn.lock"]
|
||||||
|
|
||||||
|
- label: "size/l"
|
||||||
|
size:
|
||||||
|
above: 199
|
||||||
|
below: 500
|
||||||
|
exclude-files: ["pnpm-lock.yml","yarn.lock"]
|
||||||
|
|
||||||
|
- label: "size/xl"
|
||||||
|
size:
|
||||||
|
above: 499
|
||||||
|
below: 1000
|
||||||
|
exclude-files: ["pnpm-lock.yml","yarn.lock"]
|
||||||
|
|
||||||
|
- label: "size/xxl"
|
||||||
|
size:
|
||||||
|
above: 999
|
||||||
|
exclude-files: ["pnpm-lock.yml","yarn.lock"]
|
||||||
|
|
||||||
|
- label: "usr/wanjohi"
|
||||||
|
authors: ['wanjohiryan']
|
||||||
|
|
||||||
|
- label: "usr/unknown"
|
||||||
|
negate: True
|
||||||
|
authors: ['wanjohiryan','apps/dependabot','dependabot', 'dependabot[bot]']
|
||||||
108
.github/labels.yml
vendored
Normal file
108
.github/labels.yml
vendored
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
# Default labels
|
||||||
|
- name: "type/fix"
|
||||||
|
color: "B60205"
|
||||||
|
|
||||||
|
- name: "type/build"
|
||||||
|
color: "6C55D7"
|
||||||
|
|
||||||
|
- name: "type/feat"
|
||||||
|
color: "0ADE12"
|
||||||
|
|
||||||
|
- name: "type/docs"
|
||||||
|
color: "891059"
|
||||||
|
|
||||||
|
- name: "type/refactor"
|
||||||
|
color: "8D44DF"
|
||||||
|
|
||||||
|
- name: "type/revert"
|
||||||
|
color: "5319e7"
|
||||||
|
|
||||||
|
- name: "type/style"
|
||||||
|
color: "D71964"
|
||||||
|
|
||||||
|
- name: "type/test"
|
||||||
|
color: "0B9EE8"
|
||||||
|
|
||||||
|
- name: "type/breaking"
|
||||||
|
color: "0590CC"
|
||||||
|
|
||||||
|
- name: "type/chore"
|
||||||
|
color: "B44A63"
|
||||||
|
|
||||||
|
- name: "type/ci"
|
||||||
|
color: "4FE1A6"
|
||||||
|
|
||||||
|
- name: "type/perf"
|
||||||
|
color: "4FE1A6"
|
||||||
|
|
||||||
|
- name: "mergeable/false"
|
||||||
|
color: "B60205"
|
||||||
|
|
||||||
|
- name: "priority/high"
|
||||||
|
color: "D4E734"
|
||||||
|
|
||||||
|
- name: "priority/mid"
|
||||||
|
color: "D4E734"
|
||||||
|
|
||||||
|
- name: "priority/low"
|
||||||
|
color: "D4E734"
|
||||||
|
|
||||||
|
- name: "reg/docker"
|
||||||
|
color: "5319e7"
|
||||||
|
|
||||||
|
- name: "reg/npm"
|
||||||
|
color: "5319e7"
|
||||||
|
|
||||||
|
- name: "pkg/www"
|
||||||
|
color: "5319e7"
|
||||||
|
|
||||||
|
- name: "pkg/lib"
|
||||||
|
color: "5319e7"
|
||||||
|
|
||||||
|
- name: "pkg/aws"
|
||||||
|
color: "5319e7"
|
||||||
|
|
||||||
|
- name: "scope/git"
|
||||||
|
color: "B61B66"
|
||||||
|
|
||||||
|
- name: "scope/infra"
|
||||||
|
color: "B61B66"
|
||||||
|
|
||||||
|
- name: "scope/front-end"
|
||||||
|
color: "B61B66"
|
||||||
|
|
||||||
|
- name: "scope/relay"
|
||||||
|
color: "B61B66"
|
||||||
|
|
||||||
|
- name: "scope/base"
|
||||||
|
color: "B61B66"
|
||||||
|
|
||||||
|
- name: "scope/back-end"
|
||||||
|
color: "B61B66"
|
||||||
|
|
||||||
|
- name: "size/xs"
|
||||||
|
color: "AD4322"
|
||||||
|
|
||||||
|
- name: "size/s"
|
||||||
|
color: "AD4322"
|
||||||
|
|
||||||
|
- name: "size/m"
|
||||||
|
color: "AD4322"
|
||||||
|
|
||||||
|
- name: "size/l"
|
||||||
|
color: "AD4322"
|
||||||
|
|
||||||
|
- name: "size/xl"
|
||||||
|
color: "AD4322"
|
||||||
|
|
||||||
|
- name: "size/xxl"
|
||||||
|
color: "AD4322"
|
||||||
|
|
||||||
|
- name: "usr/wanjohi"
|
||||||
|
color: "09469C"
|
||||||
|
|
||||||
|
- name: "usr/dependabot"
|
||||||
|
color: "09469C"
|
||||||
|
|
||||||
|
- name: "usr/unknown"
|
||||||
|
color: "09469C"
|
||||||
3
.github/pull_request_template.md
vendored
Normal file
3
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## Description
|
||||||
|
|
||||||
|
**What issue are you solving (or what feature are you adding) and how are you doing it?**
|
||||||
45
.github/release-drafter.yml
vendored
Normal file
45
.github/release-drafter.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name-template: 'v$RESOLVED_VERSION'
|
||||||
|
tag-template: 'v$RESOLVED_VERSION'
|
||||||
|
template: |
|
||||||
|
# What's Changed
|
||||||
|
|
||||||
|
$CHANGES
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
|
||||||
|
categories:
|
||||||
|
- title: '⚠ Breaking Changes'
|
||||||
|
label: 'type/breaking'
|
||||||
|
- title: '🚀 New Features'
|
||||||
|
label: 'type/feat'
|
||||||
|
- title: '🐜 Bug Fixes'
|
||||||
|
label: 'type/fix'
|
||||||
|
- title: '🧰 Maintenance'
|
||||||
|
label: 'type/chore'
|
||||||
|
- title: '📖 Documentation'
|
||||||
|
label: 'type/docs'
|
||||||
|
- title: '⬆ Version Upgrades'
|
||||||
|
label: 'type/build'
|
||||||
|
collapse-after: 10
|
||||||
|
- title: 'Other changes'
|
||||||
|
collapse-after: 10
|
||||||
|
|
||||||
|
version-resolver:
|
||||||
|
major:
|
||||||
|
labels:
|
||||||
|
- 'type/breaking'
|
||||||
|
minor:
|
||||||
|
labels:
|
||||||
|
- 'type/feat'
|
||||||
|
patch:
|
||||||
|
labels:
|
||||||
|
- 'type/fix'
|
||||||
|
- 'type/build'
|
||||||
|
- 'type/docs'
|
||||||
|
- 'type/chore'
|
||||||
|
- 'type/refactor'
|
||||||
|
- 'type/ci'
|
||||||
|
- 'type/style'
|
||||||
|
- 'type/test'
|
||||||
|
|
||||||
|
exclude-labels:
|
||||||
|
- 'skip-changelog'
|
||||||
93
.github/workflows/autolabeller.yml
vendored
Normal file
93
.github/workflows/autolabeller.yml
vendored
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
name: Pull request auto-labeller
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
- edited
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate:
|
||||||
|
name: Validate PR title
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- uses: amannn/action-semantic-pull-request@cfb60706e18bc85e8aec535e3c577abe8f70378e
|
||||||
|
id: lint_pr_title
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GIT_MASTER_TOKEN }}
|
||||||
|
with:
|
||||||
|
types: |-
|
||||||
|
build
|
||||||
|
chore
|
||||||
|
ci
|
||||||
|
deprecate
|
||||||
|
docs
|
||||||
|
feat
|
||||||
|
fix
|
||||||
|
perf
|
||||||
|
refactor
|
||||||
|
remove
|
||||||
|
revert
|
||||||
|
security
|
||||||
|
style
|
||||||
|
test
|
||||||
|
requireScope: false
|
||||||
|
# Ensures the subject start with an uppercase character.
|
||||||
|
subjectPattern: ^([A-Z]).+$
|
||||||
|
headerPattern: '^\s*.*?\s(\w*)(?:\(([\w$.\-*/ ]*)\))?: (.*)$'
|
||||||
|
headerPatternCorrespondence: type, scope, subject
|
||||||
|
subjectPatternError: |
|
||||||
|
The subject "{subject}" found in the pull request title "{title}"
|
||||||
|
didn't match the configured pattern. Please ensure that the subject
|
||||||
|
starts with an uppercase character
|
||||||
|
|
||||||
|
- uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
|
||||||
|
# When the previous steps fails, the workflow would stop. By adding this
|
||||||
|
# condition you can continue the execution with the populated error message.
|
||||||
|
if: always() && (steps.lint_pr_title.outputs.error_message != null)
|
||||||
|
with:
|
||||||
|
header: pr-title-lint-error
|
||||||
|
message: |
|
||||||
|
Hey there and thank you for opening this pull request! 👋🏼
|
||||||
|
|
||||||
|
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
|
||||||
|
Additionally, the subject of the title must start with an uppercase character (e.g. feat: New `search` component).
|
||||||
|
|
||||||
|
```
|
||||||
|
${{ steps.lint_pr_title.outputs.error_message }}
|
||||||
|
```
|
||||||
|
# Delete a previous comment when the issue has been resolved
|
||||||
|
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
|
||||||
|
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
|
||||||
|
with:
|
||||||
|
header: pr-title-lint-error
|
||||||
|
delete: true
|
||||||
|
|
||||||
|
label:
|
||||||
|
needs: [ validate ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Add labels
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout your code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: srvaroa/labeler@v1
|
||||||
|
with:
|
||||||
|
config_path: .github/labeler.yml
|
||||||
|
use_local_config: true #FIXME:
|
||||||
|
fail_on_error: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: "${{ secrets.GIT_MASTER_TOKEN }}"
|
||||||
33
.github/workflows/labels.yml
vendored
Normal file
33
.github/workflows/labels.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: GH labels maintainer
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
paths:
|
||||||
|
- '.github/labels.yml'
|
||||||
|
- '.github/workflows/labels.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '.github/labels.yml'
|
||||||
|
- '.github/workflows/labels.yml'
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
labeler:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
-
|
||||||
|
name: Run Labeler
|
||||||
|
uses: crazy-max/ghaction-github-labeler@v5
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: "${{ secrets.GIT_MASTER_TOKEN }}"
|
||||||
|
with:
|
||||||
|
dry-run: ${{ github.event_name == 'pull_request' }}
|
||||||
|
github-token: ${{ secrets.GIT_MASTER_TOKEN }}
|
||||||
16
.github/workflows/release-drafter.yml
vendored
Normal file
16
.github/workflows/release-drafter.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
name: Release drafter
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_release_draft:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- uses: release-drafter/release-drafter@v6
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Reference in New Issue
Block a user