Files
claude-hub/scripts/setup/docker-runner-setup.sh
Cheffromspace 12e4589169 Fix: Merge entrypoint scripts and fix auto-tagging tool permissions (#146)
* fix: merge entrypoint scripts and fix auto-tagging tool permissions

- Merged duplicate claudecode-entrypoint.sh and claudecode-tagging-entrypoint.sh scripts
- Added dynamic tool selection based on OPERATION_TYPE environment variable
- Fixed auto-tagging permissions to include required Bash(gh:*) commands
- Removed 95% code duplication between entrypoint scripts
- Simplified claudeService.ts to use unified entrypoint
- Auto-tagging now uses: Read,GitHub,Bash(gh issue edit:*),Bash(gh issue view:*),Bash(gh label list:*)
- General operations continue to use full tool set

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: update Dockerfile to use unified entrypoint script

- Remove references to deleted claudecode-tagging-entrypoint.sh
- Update build process to use single unified entrypoint script

* fix: remove unnecessary async from promisify mock to fix lint error

* feat: add Husky pre-commit hooks with Prettier as primary formatter

- Added Husky for Git pre-commit hooks
- Configured eslint-config-prettier to avoid ESLint/Prettier conflicts
- Prettier handles all formatting, ESLint handles code quality only
- Pre-commit hooks: Prettier format, ESLint check, TypeScript check
- Updated documentation with pre-commit hook setup
- All code quality issues resolved

* feat: consolidate workflows and fix permission issues with clean Docker runners

- Replace 3 complex workflows with 2 lean ones (pull-request.yml, main.yml)
- Add Docker runner configuration for clean, isolated builds
- Remove file permission hacks - use ephemeral containers instead
- Split workload: GitHub-hosted for tests/security, self-hosted for Docker builds
- Add comprehensive pre-commit configuration for security
- Update documentation to be more pragmatic
- Fix credential file permissions and security audit

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: allow Husky prepare script to fail in production builds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: update CI badge to reference new main.yml workflow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-31 20:53:58 -05:00

50 lines
1.4 KiB
Bash

#!/bin/bash
# Setup clean Docker-based GitHub Actions runners
set -euo pipefail
echo "🐳 Setting up Docker-based GitHub Actions runners..."
# Create docker-compose for runners
cat > docker-compose.runners.yml << 'EOF'
version: '3.8'
services:
github-runner-1:
image: myoung34/github-runner:latest
environment:
REPO_URL: https://github.com/intelligence-assist/claude-hub
RUNNER_TOKEN: ${RUNNER_TOKEN}
RUNNER_NAME: docker-runner-1
RUNNER_WORKDIR: /tmp/runner/work
RUNNER_GROUP: default
LABELS: linux,x64,docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- runner1-work:/tmp/runner/work
restart: unless-stopped
github-runner-2:
image: myoung34/github-runner:latest
environment:
REPO_URL: https://github.com/intelligence-assist/claude-hub
RUNNER_TOKEN: ${RUNNER_TOKEN}
RUNNER_NAME: docker-runner-2
RUNNER_WORKDIR: /tmp/runner/work
RUNNER_GROUP: default
LABELS: linux,x64,docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- runner2-work:/tmp/runner/work
restart: unless-stopped
volumes:
runner1-work:
runner2-work:
EOF
echo "✅ Docker runner configuration created"
echo "📝 To deploy:"
echo " 1. Get runner token from GitHub repo settings"
echo " 2. export RUNNER_TOKEN=your_token"
echo " 3. docker-compose -f docker-compose.runners.yml up -d"