From 3efacbdda15002ca1f98c79c18ccd288366cd3cd Mon Sep 17 00:00:00 2001 From: Eyejoker Date: Thu, 26 Mar 2026 16:56:13 +0900 Subject: [PATCH] chore: remove legacy nanoclaw CI workflows Remove bump-version, update-tokens, and merge-forward-skills workflows inherited from upstream nanoclaw. These require APP_ID/APP_PRIVATE_KEY secrets not configured for EJClaw and are unnecessary for the current direct-deploy model. Only ci.yml (PR checks) is retained. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/bump-version.yml | 32 ----- .github/workflows/merge-forward-skills.yml | 159 --------------------- .github/workflows/update-tokens.yml | 42 ------ 3 files changed, 233 deletions(-) delete mode 100644 .github/workflows/bump-version.yml delete mode 100644 .github/workflows/merge-forward-skills.yml delete mode 100644 .github/workflows/update-tokens.yml diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml deleted file mode 100644 index fb77595..0000000 --- a/.github/workflows/bump-version.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Bump version - -on: - push: - branches: [main] - paths: ['src/**', 'container/**'] - -jobs: - bump-version: - runs-on: ubuntu-latest - steps: - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ secrets.APP_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} - - - uses: actions/checkout@v4 - with: - token: ${{ steps.app-token.outputs.token }} - - - name: Bump patch version - run: | - npm version patch --no-git-tag-version - git add package.json package-lock.json - git diff --cached --quiet && exit 0 - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - VERSION=$(node -p "require('./package.json').version") - git commit -m "chore: bump version to $VERSION" - git pull --rebase - git push diff --git a/.github/workflows/merge-forward-skills.yml b/.github/workflows/merge-forward-skills.yml deleted file mode 100644 index 20dada3..0000000 --- a/.github/workflows/merge-forward-skills.yml +++ /dev/null @@ -1,159 +0,0 @@ -name: Merge-forward skill branches - -on: - push: - branches: [main] - -permissions: - contents: write - issues: write - -jobs: - merge-forward: - if: github.repository == 'qwibitai/nanoclaw' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: npm - - - name: Configure git - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - - name: Merge main into each skill branch - id: merge - run: | - FAILED="" - SUCCEEDED="" - - # List all remote skill branches - SKILL_BRANCHES=$(git branch -r --list 'origin/skill/*' | sed 's|origin/||' | xargs) - - if [ -z "$SKILL_BRANCHES" ]; then - echo "No skill branches found." - exit 0 - fi - - for BRANCH in $SKILL_BRANCHES; do - SKILL_NAME=$(echo "$BRANCH" | sed 's|skill/||') - echo "" - echo "=== Processing $BRANCH ===" - - # Checkout the skill branch - git checkout -B "$BRANCH" "origin/$BRANCH" - - # Attempt merge - if ! git merge main --no-edit; then - echo "::warning::Merge conflict in $BRANCH" - git merge --abort - FAILED="$FAILED $SKILL_NAME" - continue - fi - - # Check if there's anything new to push - if git diff --quiet "origin/$BRANCH"; then - echo "$BRANCH is already up to date with main." - SUCCEEDED="$SUCCEEDED $SKILL_NAME" - continue - fi - - # Install deps and validate - npm ci - - if ! npm run build; then - echo "::warning::Build failed for $BRANCH" - git reset --hard "origin/$BRANCH" - FAILED="$FAILED $SKILL_NAME" - continue - fi - - if ! npm test 2>/dev/null; then - echo "::warning::Tests failed for $BRANCH" - git reset --hard "origin/$BRANCH" - FAILED="$FAILED $SKILL_NAME" - continue - fi - - # Push the updated branch - git push origin "$BRANCH" - SUCCEEDED="$SUCCEEDED $SKILL_NAME" - echo "$BRANCH merged and pushed successfully." - done - - echo "" - echo "=== Results ===" - echo "Succeeded: $SUCCEEDED" - echo "Failed: $FAILED" - - # Export for issue creation - echo "failed=$FAILED" >> "$GITHUB_OUTPUT" - echo "succeeded=$SUCCEEDED" >> "$GITHUB_OUTPUT" - - - name: Open issue for failed merges - if: steps.merge.outputs.failed != '' - uses: actions/github-script@v7 - with: - script: | - const failed = '${{ steps.merge.outputs.failed }}'.trim().split(/\s+/); - const sha = context.sha.substring(0, 7); - const body = [ - `The merge-forward workflow failed to merge \`main\` (${sha}) into the following skill branches:`, - '', - ...failed.map(s => `- \`skill/${s}\`: merge conflict, build failure, or test failure`), - '', - 'Please resolve manually:', - '```bash', - ...failed.map(s => [ - `git checkout skill/${s}`, - `git merge main`, - `# resolve conflicts, then: git push`, - '' - ]).flat(), - '```', - '', - `Triggered by push to main: ${context.sha}` - ].join('\n'); - - await github.rest.issues.create({ - owner: context.repo.owner, - repo: context.repo.repo, - title: `Merge-forward failed for ${failed.length} skill branch(es) after ${sha}`, - body, - labels: ['skill-maintenance'] - }); - - - name: Notify channel forks - if: always() - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.FORK_DISPATCH_TOKEN || secrets.GITHUB_TOKEN }} - script: | - const forks = [ - 'nanoclaw-whatsapp', - 'nanoclaw-telegram', - 'nanoclaw-discord', - 'nanoclaw-slack', - 'nanoclaw-gmail', - ]; - const sha = context.sha.substring(0, 7); - for (const repo of forks) { - try { - await github.rest.repos.createDispatchEvent({ - owner: 'qwibitai', - repo, - event_type: 'upstream-main-updated', - client_payload: { sha: context.sha }, - }); - console.log(`Notified ${repo}`); - } catch (e) { - console.log(`Failed to notify ${repo}: ${e.message}`); - } - } diff --git a/.github/workflows/update-tokens.yml b/.github/workflows/update-tokens.yml deleted file mode 100644 index 753da18..0000000 --- a/.github/workflows/update-tokens.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Update token count - -on: - workflow_dispatch: - push: - branches: [main] - paths: ['src/**', 'container/**', 'launchd/**', 'CLAUDE.md'] - -jobs: - update-tokens: - runs-on: ubuntu-latest - steps: - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ secrets.APP_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} - - - uses: actions/checkout@v4 - with: - token: ${{ steps.app-token.outputs.token }} - - - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - uses: ./repo-tokens - id: tokens - with: - include: 'src/**/*.ts container/agent-runner/src/**/*.ts container/Dockerfile container/build.sh launchd/com.nanoclaw.plist CLAUDE.md' - exclude: 'src/**/*.test.ts' - badge-path: 'repo-tokens/badge.svg' - - - name: Commit if changed - run: | - git add README.md repo-tokens/badge.svg - git diff --cached --quiet && exit 0 - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git commit -m "docs: update token count to ${{ steps.tokens.outputs.badge }}" - git pull --rebase - git push