mirror of
https://github.com/prompt-security/clawsec.git
synced 2026-06-22 01:41:20 +03:00
cbc484faf3
- Introduced glossary for key terms and definitions related to security advisories, skill packaging, and CI/CD processes. - Documented the Automation and Release Pipelines module, detailing responsibilities, key files, public interfaces, and configuration. - Added ClawSec Suite Core module documentation, outlining its responsibilities, key files, public interfaces, and configuration. - Created Frontend Web App module documentation, covering responsibilities, key files, public interfaces, and configuration. - Added Local Validation and Packaging Tools module documentation, detailing responsibilities, key files, public interfaces, and configuration. - Documented NanoClaw Integration module, including responsibilities, key files, public interfaces, and configuration. - Introduced an overview of ClawSec, including purpose, repo layout, entry points, key artifacts, and workflows. - Added a Security section outlining the security model, cryptographic controls, runtime enforcement, and incident playbooks. - Created a Testing section detailing the testing strategy, verification layers, CI workflow coverage, and local testing commands. - Documented the Workflow section, covering the end-to-end lifecycle, primary workflow map, local operator workflow, and operational risks.
65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
name: Sync Wiki
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'wiki/**'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: wiki-sync
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
sync-wiki:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Sync wiki folder to repository wiki
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
|
|
if [ ! -d wiki ]; then
|
|
echo "::error::wiki/ directory not found"
|
|
exit 1
|
|
fi
|
|
|
|
WIKI_REMOTE="https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.wiki.git"
|
|
if ! git ls-remote "$WIKI_REMOTE" >/dev/null 2>&1; then
|
|
echo "::warning::Wiki remote unavailable (repository wiki may be disabled). Skipping sync."
|
|
exit 0
|
|
fi
|
|
|
|
WIKI_TMP="$(mktemp -d)"
|
|
trap 'rm -rf "$WIKI_TMP"' EXIT
|
|
|
|
git clone --depth 1 "$WIKI_REMOTE" "$WIKI_TMP"
|
|
rsync -a --delete --exclude '.git/' wiki/ "$WIKI_TMP/"
|
|
|
|
cd "$WIKI_TMP"
|
|
if [ -z "$(git status --porcelain)" ]; then
|
|
echo "No wiki changes to sync."
|
|
exit 0
|
|
fi
|
|
|
|
WIKI_HEAD_REF="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null || true)"
|
|
if [ -n "$WIKI_HEAD_REF" ]; then
|
|
WIKI_BRANCH="${WIKI_HEAD_REF#origin/}"
|
|
else
|
|
WIKI_BRANCH="master"
|
|
fi
|
|
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add -A
|
|
git commit -m "docs(wiki): sync from ${GITHUB_SHA}"
|
|
git push origin HEAD:"$WIKI_BRANCH"
|