* feat: integrate claude-code-base-action as local subaction
- Copy claude-code-base-action into base-action/ directory
- Update action.yml to reference ./base-action instead of external repo
- Preserve complete base action structure for future refactoring
This eliminates the external dependency while maintaining modularity.
* feat: consolidate CI workflows and add version bump workflow
- Move base-action test workflows to main .github/workflows/
- Update workflow references to use ./base-action
- Add CI jobs for base-action (test, typecheck, prettier)
- Add bump-claude-code-version workflow for base-action
- Remove redundant .github directory from base-action
This consolidates all CI workflows in one place while maintaining
full test coverage for both the main action and base-action.
* tsc
* copy again
* fix tests
* fix: use absolute path for base-action reference
Replace relative path ./base-action with ${{ github.action_path }}/base-action
to ensure the action works correctly when used in other repositories.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: inline base-action execution to support usage in other repos
Replace uses: ./base-action with direct shell execution since GitHub Actions
doesn't support dynamic paths in composite actions. This ensures the action
works correctly when used in other repositories.
Changes:
- Install Claude Code globally before execution
- Run base-action's index.ts directly with bun
- Pass all required INPUT_* environment variables
- Maintain base-action for future separate publishing
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
2.7 KiB
Contributing to Claude Code Base Action
Thank you for your interest in contributing to Claude Code Base Action! This document provides guidelines and instructions for contributing to the project.
Getting Started
Prerequisites
- Bun runtime
- Docker (for running GitHub Actions locally)
- act (installed automatically by our test script)
- An Anthropic API key (for testing)
Setup
-
Fork the repository on GitHub and clone your fork:
git clone https://github.com/your-username/claude-code-base-action.git cd claude-code-base-action -
Install dependencies:
bun install -
Set up your Anthropic API key:
export ANTHROPIC_API_KEY="your-api-key-here"
Development
Available Scripts
bun test- Run all testsbun run typecheck- Type check the codebun run format- Format code with Prettierbun run format:check- Check code formatting
Testing
Running Tests Locally
-
Unit Tests:
bun test -
Integration Tests (using GitHub Actions locally):
./test-local.shThis script:
- Installs
actif not present (requires Homebrew on macOS) - Runs the GitHub Action workflow locally using Docker
- Requires your
ANTHROPIC_API_KEYto be set
On Apple Silicon Macs, the script automatically adds the
--container-architecture linux/amd64flag to avoid compatibility issues. - Installs
Pull Request Process
-
Create a new branch from
main:git checkout -b feature/your-feature-name -
Make your changes and commit them:
git add . git commit -m "feat: add new feature" -
Run tests and formatting:
bun test bun run typecheck bun run format:check -
Push your branch and create a Pull Request:
git push origin feature/your-feature-name -
Ensure all CI checks pass
-
Request review from maintainers
Action Development
Testing Your Changes
When modifying the action:
-
Test locally with the test script:
./test-local.sh -
Test in a real GitHub Actions workflow by:
- Creating a test repository
- Using your branch as the action source:
uses: your-username/claude-code-base-action@your-branch
Debugging
- Use
console.logfor debugging in development - Check GitHub Actions logs for runtime issues
- Use
actwith-vflag for verbose output:act push -v --secret ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY"
Common Issues
Docker Issues
Make sure Docker is running before using act. You can check with:
docker ps