mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
* 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>
46 lines
1.1 KiB
Bash
46 lines
1.1 KiB
Bash
#!/bin/sh
|
|
|
|
# Check if files need formatting before push
|
|
echo "Checking code formatting..."
|
|
|
|
# First check if any files need formatting
|
|
if ! bun run format:check; then
|
|
echo "Code formatting errors found. Running formatter..."
|
|
bun run format
|
|
|
|
# Check if there are any staged changes after formatting
|
|
if git diff --name-only --exit-code; then
|
|
echo "All files are now properly formatted."
|
|
else
|
|
echo ""
|
|
echo "ERROR: Code has been formatted but changes need to be committed!"
|
|
echo "Please commit the formatted files and try again."
|
|
echo ""
|
|
echo "The following files were modified:"
|
|
git diff --name-only
|
|
echo ""
|
|
exit 1
|
|
fi
|
|
else
|
|
echo "Code formatting is already correct."
|
|
fi
|
|
|
|
# Run type checking
|
|
echo "Running type checking..."
|
|
if ! bun run typecheck; then
|
|
echo "Type checking failed. Please fix the type errors and try again."
|
|
exit 1
|
|
else
|
|
echo "Type checking passed."
|
|
fi
|
|
|
|
# Run tests
|
|
echo "Running tests..."
|
|
if ! bun run test; then
|
|
echo "Tests failed. Please fix the failing tests and try again."
|
|
exit 1
|
|
else
|
|
echo "All tests passed."
|
|
fi
|
|
|
|
exit 0 |