Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/DISCUSSION_TEMPLATE/ideas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
title: "[Idea]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Share an idea, workflow improvement, or experiment proposal before opening a formal feature request or PR.

- type: textarea
id: summary
attributes:
label: Idea Summary
description: What would you like to build, add, or change?
placeholder: Briefly describe the idea...
validations:
required: true

- type: textarea
id: motivation
attributes:
label: Problem or Motivation
description: Why is this useful, and what pain point does it solve?
placeholder: Explain the use case...
validations:
required: true

- type: textarea
id: context
attributes:
label: Design Notes or Alternatives
description: Optional sketches, CLI/UI examples, or trade-offs to consider.
26 changes: 26 additions & 0 deletions .github/DISCUSSION_TEMPLATE/q-a.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
title: "[Question]: "
labels: ["question"]
body:
- type: markdown
attributes:
value: |
Ask a question about setup, usage, architecture, or troubleshooting.

- type: textarea
id: question
attributes:
label: Question
description: What are you trying to do or understand?
placeholder: Describe your question clearly...
validations:
required: true

- type: textarea
id: context
attributes:
label: Context and Environment
description: Relevant project version, OS, configuration, or commands already tried.
placeholder: |
- Project / version:
- OS:
- What I tried:
82 changes: 82 additions & 0 deletions .github/labels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[
{
"name": "bug",
"color": "d73a4a",
"description": "Something is not working as expected"
},
{
"name": "enhancement",
"color": "a2eeef",
"description": "New feature or improvement request"
},
{
"name": "documentation",
"color": "0075ca",
"description": "Improvements or additions to documentation"
},
{
"name": "duplicate",
"color": "cfd3d7",
"description": "This issue or pull request already exists"
},
{
"name": "good first issue",
"color": "7057ff",
"description": "Good starting point for newcomers"
},
{
"name": "help wanted",
"color": "008672",
"description": "Extra attention or community help is welcome"
},
{
"name": "invalid",
"color": "e4e669",
"description": "Does not appear valid or actionable"
},
{
"name": "question",
"color": "d876e3",
"description": "Further information or clarification requested"
},
{
"name": "wontfix",
"color": "ffffff",
"description": "This will not be worked on"
},
{
"name": "needs-triage",
"color": "fbca04",
"description": "Awaiting maintainer review and categorization"
},
{
"name": "dependencies",
"color": "0366d6",
"description": "Dependency version updates"
},
{
"name": "security",
"color": "b60205",
"description": "Security vulnerability, hardening, or advisory"
},
{
"name": "ci",
"color": "1d76db",
"description": "Continuous integration, release, or workflow changes"
},
{
"name": "github-actions",
"color": "2088ff",
"description": "GitHub Actions workflow updates"
},
{
"name": "go",
"color": "00add8",
"description": "Go code or toolchain"
},
{
"name": "rust",
"color": "dea584",
"description": "Rust code or toolchain"
}
]
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Validate Shared Config

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: validate-${{ github.ref }}
cancel-in-progress: true

jobs:
validate:
name: Validate templates, labels, and workflows
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Validate labels.json schema
run: |
set -euo pipefail
jq -e '
type == "array" and length > 0 and
all(.[];
(.name | type == "string" and length > 0) and
(.color | type == "string" and test("^[0-9a-fA-F]{6}$")) and
(.description | type == "string" and length <= 100)
)
' .github/labels.json > /dev/null

- name: Validate YAML files and discussion form keys
run: |
set -euo pipefail
ruby -ryaml -e '
files = Dir.glob(["*.yml", "ISSUE_TEMPLATE/*.yml", ".github/DISCUSSION_TEMPLATE/*.yml", ".github/workflows/*.yml"])
raise "No YAML files matched" if files.empty?
files.each do |f|
data = YAML.load_file(f)
raise "#{f} parsed to nil" if data.nil?
end
Dir.glob(".github/DISCUSSION_TEMPLATE/*.yml").each do |f|
data = YAML.load_file(f)
extra = data.keys - ["title", "labels", "body"]
raise "#{f} contains unsupported top-level keys: #{extra.join(", ")}" unless extra.empty?
end
puts "Validated #{files.length} YAML files"
'

- name: Set up Go for actionlint
uses: actions/setup-go@v7
with:
go-version: "stable"

- name: Install and run actionlint
run: |
set -euo pipefail
go install github.com/rhysd/actionlint/cmd/actionlint@latest
actionlint -color
34 changes: 34 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Dependency Review

on:
workflow_call:
inputs:
fail-on-severity:
description: "Minimum vulnerability severity that fails the check (low, moderate, high, critical)"
required: false
type: string
default: "moderate"
allow-licenses:
description: "Comma-separated list of SPDX license identifiers allowed in dependencies"
required: false
type: string
default: "MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, 0BSD, MPL-2.0"

permissions:
contents: read
pull-requests: write

jobs:
dependency-review:
name: Dependency Review
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Dependency Review
uses: actions/dependency-review-action@v5
with:
fail-on-severity: ${{ inputs.fail-on-severity }}
comment-summary-in-pr: always
allow-licenses: ${{ inputs.allow-licenses }}
86 changes: 86 additions & 0 deletions .github/workflows/docs-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Docs Pages

on:
workflow_call:
inputs:
working-directory:
description: "Directory containing package.json and pnpm-lock.yaml"
required: false
type: string
default: "docs"
artifact-path:
description: "Built static site output directory to upload to GitHub Pages"
required: false
type: string
default: "docs/dist"
node-version:
description: "Node.js version to use for building the site"
required: false
type: string
default: "22"
build-command:
description: "Build command executed inside working-directory"
required: false
type: string
default: "pnpm build"
deploy:
description: "Deploy the uploaded artifact to GitHub Pages (set false on pull_request checks)"
required: false
type: boolean
default: true

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Set up Node
uses: actions/setup-node@v7
with:
node-version: ${{ inputs.node-version }}

- name: Enable corepack
run: corepack enable

- name: Install dependencies
working-directory: ${{ inputs.working-directory }}
run: pnpm install --frozen-lockfile

- name: Build static site
working-directory: ${{ inputs.working-directory }}
env:
BUILD_CMD: ${{ inputs.build-command }}
run: |
set -euo pipefail
eval "$BUILD_CMD"

- name: Configure Pages
if: inputs.deploy
uses: actions/configure-pages@v6

- name: Upload Pages artifact
if: inputs.deploy
uses: actions/upload-pages-artifact@v5
with:
path: ${{ inputs.artifact-path }}

deploy:
name: Deploy to GitHub Pages
if: inputs.deploy
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy artifact
id: deployment
uses: actions/deploy-pages@v5
Loading
Loading