Skip to content

build(deps): Bump actions/checkout from 4 to 6 #1

build(deps): Bump actions/checkout from 4 to 6

build(deps): Bump actions/checkout from 4 to 6 #1

Workflow file for this run

name: Label PRs
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
pull-requests: write
jobs:
label:
name: Auto-label by path
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Get changed files
id: changed
run: |
FILES=$(gh pr diff ${{ github.event.pull_request.number }} --name-only)
echo "files<<EOF" >> "$GITHUB_OUTPUT"
echo "$FILES" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Apply labels
run: |
LABELS=""
if echo "$FILES" | grep -q "^skills/"; then
LABELS="$LABELS,skills"
fi
if echo "$FILES" | grep -q "^rules/"; then
LABELS="$LABELS,rules"
fi
if echo "$FILES" | grep -q "^mcp-server/"; then
LABELS="$LABELS,mcp-server"
fi
if echo "$FILES" | grep -q "^docs/"; then
LABELS="$LABELS,documentation"
fi
if echo "$FILES" | grep -q "^\.github/"; then
LABELS="$LABELS,ci"
fi
LABELS="${LABELS#,}"
if [ -n "$LABELS" ]; then
gh pr edit ${{ github.event.pull_request.number }} --add-label "$LABELS"
fi
env:
FILES: ${{ steps.changed.outputs.files }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}