Skip to content

feat(explainer-video): add branded vertical explainer video skill #16

feat(explainer-video): add branded vertical explainer video skill

feat(explainer-video): add branded vertical explainer video skill #16

name: Validate Agent Skill
on:
push:
branches: [main]
paths:
- "**/SKILL.md"
pull_request:
branches: [main]
paths:
- "**/SKILL.md"
concurrency:
group: validate-skill-${{ github.ref }}
cancel-in-progress: true
jobs:
detect-changes:
runs-on: ubuntu-slim
if: github.event.pull_request.draft != true && github.actor != 'dependabot[bot]'
outputs:
skills: ${{ steps.changed-skills.outputs.skills }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get changed skills
id: changed-skills
env:
EVENT_NAME: ${{ github.event_name }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PUSH_BEFORE: ${{ github.event.before }}
PUSH_AFTER: ${{ github.event.after }}
run: |
if [ "$EVENT_NAME" = "pull_request" ]; then
BASE="$PR_BASE_SHA"
HEAD="$PR_HEAD_SHA"
else
BASE="$PUSH_BEFORE"
HEAD="$PUSH_AFTER"
fi
# Find changed SKILL.md files and extract skill directories
SKILLS=$(git diff --name-only "$BASE" "$HEAD" | \
grep 'SKILL.md$' | \
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:
needs: detect-changes
if: needs.detect-changes.outputs.skills != '[]'
runs-on: ubuntu-slim
strategy:
fail-fast: false
matrix:
skill: ${{ fromJson(needs.detect-changes.outputs.skills) }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Validate ${{ matrix.skill }}
uses: Flash-Brew-Digital/validate-skill@v1
with:
path: ${{ matrix.skill }}