-
Notifications
You must be signed in to change notification settings - Fork 9
81 lines (79 loc) · 2.47 KB
/
ci.yaml
File metadata and controls
81 lines (79 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: ci
on:
pull_request:
branches:
- main
jobs:
markdown:
name: 📝 Markdown Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Lint Markdown
uses: DavidAnson/markdownlint-cli2-action@v23
with:
globs: '**/*.md !CHANGELOG.md'
config: 'config/custom.markdownlint.jsonc'
spelling:
name: ✍️ Spelling Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Spell Check Code
uses: streetsidesoftware/cspell-action@v8
with:
files: '**/*.md !CHANGELOG.md'
config: 'config/cspell.json'
detect-changed-skills:
name: 🔎 Detect Changed Skills
runs-on: ubuntu-latest
outputs:
skills: ${{ steps.changed-skills.outputs.skills }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get changed skills
id: changed-skills
run: |
BASE=${{ github.event.pull_request.base.sha }}
HEAD=${{ github.event.pull_request.head.sha }}
SKILLS=$(git diff --name-only $BASE $HEAD | \
{ grep 'SKILL.md' || true; } | \
xargs -I {} dirname {} | \
sort -u | \
jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "skills=$SKILLS" >> "$GITHUB_OUTPUT"
echo "Changed skills: $SKILLS"
validate-skills:
name: 🔍 Validate Skills
needs: detect-changed-skills
if: needs.detect-changed-skills.outputs.skills != '[]'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
skill: ${{ fromJson(needs.detect-changed-skills.outputs.skills) }}
steps:
- uses: actions/checkout@v6
- name: Validate ${{ matrix.skill }}
id: validate
uses: Flash-Brew-Digital/validate-skill@v1
with:
path: ${{ matrix.skill }}
validate-references: 'true'
fail-on-warning: 'true'
ignore-rules: 'name-match-directory,unknown-field'
- name: Check results
if: always()
run: |
echo "Valid: ${{ steps.validate.outputs.valid }}"
echo "Errors: ${{ steps.validate.outputs.errors }}"
echo "Warnings: ${{ steps.validate.outputs.warnings }}"
manifest-validation:
name: 📦 Manifest Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Validate Plugin Manifest
run: bash ./scripts/validate_plugin_manifest.sh