mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 00:47:57 +00:00
* chore: install OpenClaw design system * feat: adopt shared design system palette * chore: automate design system updates * feat: add weekly design system audit * fix: prevent mobile skills tab overlap * fix: harden design audit automation * fix: validate audit changes before execution * fix: scope design system clone credentials * fix: align audit with installed design release * fix: preserve audit artifacts and access * feat: adopt shared design system on landing page * fix: align icon geometry with design tokens * chore: pin design system to v0.0.1 * chore: pin design system to v0.0.1 * chore: pin design system to v0.0.1 * chore: pin design system to v0.0.1 * chore: pin design system to v0.0.1 * fix: migrate ClawHub UI to design tokens * fix: use public design system installs * fix: use public design system distribution
118 lines
3.8 KiB
YAML
118 lines
3.8 KiB
YAML
name: Update design system skills
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "17 15 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
concurrency:
|
|
group: update-design-system-skills
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
update:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Resolve latest design-system release
|
|
id: release
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
tag="$(gh api repos/openclaw/design-system/releases/latest --jq .tag_name)"
|
|
test -n "$tag"
|
|
echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Reinstall released design skills
|
|
env:
|
|
DESIGN_SYSTEM_TAG: ${{ steps.release.outputs.tag }}
|
|
run: |
|
|
npm exec --yes --package=skills@1.5.15 -- skills add \
|
|
"https://github.com/openclaw/design-system.git#${DESIGN_SYSTEM_TAG}" \
|
|
--skill "*" \
|
|
--agent codex \
|
|
--copy \
|
|
--yes \
|
|
--full-depth
|
|
|
|
- name: Validate and stage expected changes
|
|
id: changes
|
|
run: |
|
|
allowed='^(\.agents/skills/openclaw-(brand|design|design-audit|design-system|marketing-pages)(/|$)|skills-lock\.json)$'
|
|
unexpected="$(
|
|
git status --short --untracked-files=all \
|
|
| sed -E 's/^.. //' \
|
|
| grep -Ev "$allowed" \
|
|
|| true
|
|
)"
|
|
if [[ -n "$unexpected" ]]; then
|
|
echo "Unexpected paths changed:"
|
|
echo "$unexpected"
|
|
exit 1
|
|
fi
|
|
|
|
git add \
|
|
.agents/skills/openclaw-brand \
|
|
.agents/skills/openclaw-design \
|
|
.agents/skills/openclaw-design-audit \
|
|
.agents/skills/openclaw-design-system \
|
|
.agents/skills/openclaw-marketing-pages \
|
|
skills-lock.json
|
|
|
|
if git diff --cached --quiet; then
|
|
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Open or update pull request
|
|
if: steps.changes.outputs.changed == 'true'
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
DESIGN_SYSTEM_TAG: ${{ steps.release.outputs.tag }}
|
|
run: |
|
|
branch="automation/design-system-skills"
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git fetch origin "refs/heads/${branch}:refs/remotes/origin/${branch}" || true
|
|
git switch -C "$branch"
|
|
git commit -m "chore: update design system skills to ${DESIGN_SYSTEM_TAG}"
|
|
git push --force-with-lease origin "$branch"
|
|
|
|
body="$RUNNER_TEMP/design-system-skills-pr.md"
|
|
{
|
|
echo "## Summary"
|
|
echo
|
|
echo "- refresh committed OpenClaw design skills from release ${DESIGN_SYSTEM_TAG}"
|
|
echo "- update only the five design-system skill directories and skills-lock.json"
|
|
echo
|
|
echo "Generated by the daily design-system skill updater."
|
|
} > "$body"
|
|
|
|
number="$(
|
|
gh pr list \
|
|
--head "$branch" \
|
|
--state open \
|
|
--json number \
|
|
--jq '.[0].number // empty'
|
|
)"
|
|
if [[ -n "$number" ]]; then
|
|
gh pr edit "$number" \
|
|
--title "chore: update design system skills to ${DESIGN_SYSTEM_TAG}" \
|
|
--body-file "$body"
|
|
else
|
|
gh pr create \
|
|
--base main \
|
|
--head "$branch" \
|
|
--title "chore: update design system skills to ${DESIGN_SYSTEM_TAG}" \
|
|
--body-file "$body"
|
|
fi
|