Gitea picks up workflows from .gitea/. Adds yamllint, shellcheck, and a skill-frontmatter validation step alongside the existing markdownlint run, so PRs catch malformed YAML, shell scripts, and missing skill metadata before merge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,44 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install linters
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends shellcheck yamllint
|
||||||
|
|
||||||
|
- name: Lint Markdown
|
||||||
|
uses: DavidAnson/markdownlint-cli2-action@v19
|
||||||
|
with:
|
||||||
|
globs: "**/*.md"
|
||||||
|
|
||||||
|
- name: Lint YAML
|
||||||
|
run: yamllint .
|
||||||
|
|
||||||
|
- name: Shellcheck
|
||||||
|
run: shellcheck scripts/*.sh
|
||||||
|
|
||||||
|
- name: Validate skill frontmatter
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
fail=0
|
||||||
|
for f in skills/*/SKILL.md; do
|
||||||
|
fm=$(awk 'BEGIN{c=0} /^---$/{c++; next} c==1{print} c>=2{exit}' "$f")
|
||||||
|
for key in name description; do
|
||||||
|
if ! printf '%s\n' "$fm" | grep -qE "^${key}:[[:space:]]"; then
|
||||||
|
echo "::error file=${f}::missing '${key}' in YAML frontmatter"
|
||||||
|
fail=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
exit $fail
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Lint Markdown
|
|
||||||
uses: DavidAnson/markdownlint-cli2-action@v19
|
|
||||||
with:
|
|
||||||
globs: "**/*.md"
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
line-length: disable
|
||||||
|
document-start: disable
|
||||||
|
truthy:
|
||||||
|
check-keys: false
|
||||||
Reference in New Issue
Block a user