Skip to content

Commit 4835724

Browse files
committed
Init Claude Code
1 parent e6a39e1 commit 4835724

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This repository contains shared GitHub Actions for automating common development workflows. The primary action is `simple-commit-and-push` which safely commits and pushes changes only when they exist.
8+
9+
## Architecture
10+
11+
- `.github/actions/simple-commit-and-push/` - Main reusable action for committing and pushing changes
12+
- `.github/workflows/` - CI workflows for testing and validation
13+
- `Taskfile.yml` - Task runner configuration with development commands
14+
- `mise.toml` - Tool management configuration
15+
16+
## Common Commands
17+
18+
This project uses [Task](https://taskfile.dev/) as the task runner. Install tools first:
19+
20+
```bash
21+
task setup
22+
```
23+
24+
### Development Tasks
25+
26+
- `task check` - Run all checks (markdown linting and GitHub Actions validation)
27+
- `task md:check` - Check and fix markdown files
28+
- `task md:lint` - Lint markdown files with markdownlint
29+
- `task md:lint-fix` - Auto-fix markdown linting issues
30+
- `task github:validate-workflow` - Validate GitHub Actions workflows with actionlint
31+
32+
### Tool Requirements
33+
34+
The project uses mise for tool management:
35+
36+
- `markdownlint-cli` - For markdown linting
37+
- `actionlint` - For GitHub Actions workflow validation
38+
39+
## GitHub Actions Structure
40+
41+
### simple-commit-and-push Action
42+
43+
Located in `.github/actions/simple-commit-and-push/action.yml`, this composite action:
44+
45+
- Checks for changes using `git status --porcelain`
46+
- Only commits and pushes if changes exist
47+
- Configures git user settings
48+
- Uses token authentication for pushing
49+
- Supports configurable commit messages and user details
50+
51+
**Inputs:**
52+
53+
- `github-token` (required) - GitHub token for authentication
54+
- `commit-message` (optional) - Commit message, defaults to "Auto commit"
55+
- `user-email` (optional) - Git user email, defaults to "<action@github.com>"
56+
- `user-name` (optional) - Git user name, defaults to "GitHub Action"
57+
58+
### Testing
59+
60+
The action is thoroughly tested in `test-simple-commit-and-push.yml` workflow with three test scenarios:
61+
62+
1. Default inputs test
63+
2. Custom inputs test
64+
3. No changes test (ensures no commit when no changes exist)

0 commit comments

Comments
 (0)