Rebrand from act_runner to gitcaddy-runner v1.0.0
All checks were successful
Release / build (amd64, linux) (push) Successful in 1m15s
CI / build-and-test (push) Successful in 1m7s
Release / build (amd64, windows) (push) Successful in 1m3s
Release / build (amd64, darwin) (push) Successful in 1m8s
Release / build (arm64, darwin) (push) Successful in 46s
Release / build (arm64, linux) (push) Successful in 50s
Release / release (push) Successful in 26s
All checks were successful
Release / build (amd64, linux) (push) Successful in 1m15s
CI / build-and-test (push) Successful in 1m7s
Release / build (amd64, windows) (push) Successful in 1m3s
Release / build (amd64, darwin) (push) Successful in 1m8s
Release / build (arm64, darwin) (push) Successful in 46s
Release / build (arm64, linux) (push) Successful in 50s
Release / release (push) Successful in 26s
- Update module path: gitea.com/gitea/act_runner → git.marketally.com/gitcaddy/gitcaddy-runner - Update all import paths across Go source files - Update Makefile LDFLAGS and package references - Update .goreleaser.yaml ldflags and S3 directory path - Add comprehensive README with capacity configuration documentation - Document troubleshooting for capacity feature and Docker detection - Bump version to v1.0.0 for major rebrand - All linting checks passed (fmt-check, go mod tidy, go vet)
This commit is contained in:
@@ -63,7 +63,7 @@ builds:
|
||||
flags:
|
||||
- -trimpath
|
||||
ldflags:
|
||||
- -s -w -X gitea.com/gitea/act_runner/internal/pkg/ver.version={{ .Summary }}
|
||||
- -s -w -X git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/ver.version={{ .Summary }}
|
||||
binary: >-
|
||||
{{ .ProjectName }}-
|
||||
{{- .Version }}-
|
||||
@@ -86,7 +86,7 @@ blobs:
|
||||
provider: s3
|
||||
bucket: "{{ .Env.S3_BUCKET }}"
|
||||
region: "{{ .Env.S3_REGION }}"
|
||||
directory: "act_runner/{{.Version}}"
|
||||
directory: "gitcaddy-runner/{{.Version}}"
|
||||
extra_files:
|
||||
- glob: ./**.xz
|
||||
- glob: ./**.sha256
|
||||
|
||||
4
Makefile
4
Makefile
@@ -67,11 +67,11 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
GO_PACKAGES_TO_VET ?= $(filter-out gitea.com/gitea/act_runner/internal/pkg/client/mocks,$(shell $(GO) list ./...))
|
||||
GO_PACKAGES_TO_VET ?= $(filter-out git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/client/mocks,$(shell $(GO) list ./...))
|
||||
|
||||
|
||||
TAGS ?=
|
||||
LDFLAGS ?= -X "gitea.com/gitea/act_runner/internal/pkg/ver.version=v$(RELASE_VERSION)"
|
||||
LDFLAGS ?= -X "git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/ver.version=v$(RELASE_VERSION)"
|
||||
|
||||
all: build
|
||||
|
||||
|
||||
523
README.md
523
README.md
@@ -1,121 +1,81 @@
|
||||
# GitCaddy Act Runner
|
||||
# GitCaddy Runner
|
||||
|
||||
A Gitea Actions runner with enhanced capability detection and reporting for AI-friendly workflow generation.
|
||||
|
||||
> **This is a GitCaddy fork** of [gitea.com/gitea/act_runner](https://gitea.com/gitea/act_runner) with runner capability discovery features.
|
||||
GitCaddy Runner is a hard fork of Gitea's act_runner, rebranded and enhanced with automated capability detection to enable AI tools to generate compatible workflows based on available resources.
|
||||
|
||||
## Overview
|
||||
## Features
|
||||
|
||||
Act Runner executes Gitea Actions workflows using [act](https://github.com/nektos/act). This fork adds automatic capability detection, enabling Gitea to expose runner capabilities via API for AI tools to query before generating workflows.
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Capability Detection**: Automatically detects OS, architecture, Docker support, available shells, and installed tools
|
||||
- **Capability Reporting**: Reports capabilities to Gitea server during runner declaration
|
||||
- **Full Compatibility**: Drop-in replacement for standard act_runner
|
||||
- **Multi-Platform**: Supports Linux, macOS, and Windows
|
||||
- **Automated Capability Detection**: Automatically identifies OS, architecture, installed tools, and available resources
|
||||
- **Concurrent Job Execution**: Configure runner capacity to handle multiple jobs simultaneously
|
||||
- **Docker Support**: Full support for Docker and Docker Compose workflows
|
||||
- **Xcode Integration**: Detects Xcode installations, SDKs, and simulators on macOS
|
||||
- **Tool Detection**: Identifies installed tools (Node.js, Python, .NET, Go, Ruby, Swift, etc.)
|
||||
- **AI-Friendly API**: Exposes capabilities through Gitea's API for automated workflow generation
|
||||
- **Cache Support**: Built-in workflow cache support for faster builds
|
||||
|
||||
## Installation
|
||||
|
||||
### Download Pre-built Binary
|
||||
### Pre-built Binaries
|
||||
|
||||
Download from [Releases](https://git.marketally.com/gitcaddy/act_runner/releases):
|
||||
Download the latest release for your platform from the [releases page](https://git.marketally.com/gitcaddy/gitcaddy-runner/releases):
|
||||
|
||||
**macOS:**
|
||||
```bash
|
||||
# Linux (amd64)
|
||||
curl -L -o act_runner https://git.marketally.com/gitcaddy/act_runner/releases/download/v0.3.1-gitcaddy/act_runner-linux-amd64
|
||||
chmod +x act_runner
|
||||
# Apple Silicon (M1/M2/M3/M4)
|
||||
curl -L -o gitcaddy-runner https://git.marketally.com/gitcaddy/gitcaddy-runner/releases/download/v0.4.5/gitcaddy-runner-0.4.5-darwin-arm64
|
||||
chmod +x gitcaddy-runner
|
||||
|
||||
# macOS (Apple Silicon)
|
||||
curl -L -o act_runner https://git.marketally.com/gitcaddy/act_runner/releases/download/v0.3.1-gitcaddy/act_runner-darwin-arm64
|
||||
chmod +x act_runner
|
||||
# Intel
|
||||
curl -L -o gitcaddy-runner https://git.marketally.com/gitcaddy/gitcaddy-runner/releases/download/v0.4.5/gitcaddy-runner-0.4.5-darwin-amd64
|
||||
chmod +x gitcaddy-runner
|
||||
```
|
||||
|
||||
**Linux:**
|
||||
```bash
|
||||
# x86_64
|
||||
curl -L -o gitcaddy-runner https://git.marketally.com/gitcaddy/gitcaddy-runner/releases/download/v0.4.5/gitcaddy-runner-0.4.5-linux-amd64
|
||||
chmod +x gitcaddy-runner
|
||||
|
||||
# ARM64
|
||||
curl -L -o gitcaddy-runner https://git.marketally.com/gitcaddy/gitcaddy-runner/releases/download/v0.4.5/gitcaddy-runner-0.4.5-linux-arm64
|
||||
chmod +x gitcaddy-runner
|
||||
```
|
||||
|
||||
**Windows:**
|
||||
```powershell
|
||||
# Download the Windows executable
|
||||
# https://git.marketally.com/gitcaddy/gitcaddy-runner/releases/download/v0.4.5/gitcaddy-runner-0.4.5-windows-amd64.exe
|
||||
```
|
||||
|
||||
### Build from Source
|
||||
|
||||
```bash
|
||||
git clone https://git.marketally.com/gitcaddy/act_runner.git
|
||||
cd act_runner
|
||||
git clone https://git.marketally.com/gitcaddy/gitcaddy-runner.git
|
||||
cd gitcaddy-runner
|
||||
make build
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
### 1. Enable Actions in Gitea
|
||||
### 1. Enable Gitea Actions
|
||||
|
||||
Add to your Gitea `app.ini`:
|
||||
In your Gitea `app.ini`:
|
||||
|
||||
```ini
|
||||
[actions]
|
||||
ENABLED = true
|
||||
```
|
||||
|
||||
### 2. Register the Runner
|
||||
### 2. Generate Configuration
|
||||
|
||||
```bash
|
||||
./act_runner register \
|
||||
--instance https://your-gitea-instance.com \
|
||||
--token YOUR_RUNNER_TOKEN \
|
||||
--name my-runner \
|
||||
--labels ubuntu-latest,docker
|
||||
./gitcaddy-runner generate-config > config.yaml
|
||||
```
|
||||
|
||||
### 3. Start the Runner
|
||||
### 3. Configure the Runner
|
||||
|
||||
```bash
|
||||
./act_runner daemon
|
||||
```
|
||||
|
||||
On startup, the runner will:
|
||||
1. Detect system capabilities (OS, arch, Docker, shells, tools)
|
||||
2. Report capabilities to Gitea via the Declare API
|
||||
3. Begin polling for jobs
|
||||
|
||||
## Capability Detection
|
||||
|
||||
The runner automatically detects:
|
||||
|
||||
| Category | Examples |
|
||||
|----------|----------|
|
||||
| **OS/Arch** | linux/amd64, darwin/arm64, windows/amd64 |
|
||||
| **Container Runtime** | Docker, Podman |
|
||||
| **Shells** | bash, sh, zsh, powershell, cmd |
|
||||
| **Tools** | Node.js, Go, Python, Java, .NET, Rust |
|
||||
| **Features** | Cache support, Docker Compose |
|
||||
|
||||
### Example Capabilities JSON
|
||||
|
||||
```json
|
||||
{
|
||||
"os": "linux",
|
||||
"arch": "amd64",
|
||||
"docker": true,
|
||||
"docker_compose": true,
|
||||
"container_runtime": "docker",
|
||||
"shell": ["bash", "sh"],
|
||||
"tools": {
|
||||
"node": ["18.19.0"],
|
||||
"go": ["1.21.5"],
|
||||
"python": ["3.11.6"]
|
||||
},
|
||||
"features": {
|
||||
"cache": true,
|
||||
"docker_services": true
|
||||
},
|
||||
"limitations": []
|
||||
}
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Create a config file or use command-line flags:
|
||||
|
||||
```bash
|
||||
./act_runner generate-config > config.yaml
|
||||
./act_runner -c config.yaml daemon
|
||||
```
|
||||
|
||||
Example configuration:
|
||||
Edit `config.yaml` to customize settings. **Important configuration options:**
|
||||
|
||||
```yaml
|
||||
log:
|
||||
@@ -123,73 +83,380 @@ log:
|
||||
|
||||
runner:
|
||||
file: .runner
|
||||
capacity: 1
|
||||
capacity: 2 # Number of concurrent jobs (default: 1)
|
||||
timeout: 3h
|
||||
insecure: false
|
||||
fetch_timeout: 5s
|
||||
fetch_interval: 2s
|
||||
labels:
|
||||
- ubuntu-latest:docker://node:18-bullseye
|
||||
- ubuntu-22.04:docker://ubuntu:22.04
|
||||
|
||||
container:
|
||||
docker_host: ""
|
||||
force_pull: false
|
||||
privileged: false
|
||||
- "ubuntu-latest:docker://node:16-bullseye"
|
||||
- "ubuntu-22.04:docker://node:16-bullseye"
|
||||
|
||||
cache:
|
||||
enabled: true
|
||||
dir: ~/.cache/actcache
|
||||
dir: ""
|
||||
|
||||
container:
|
||||
network: ""
|
||||
privileged: false
|
||||
options: ""
|
||||
valid_volumes: []
|
||||
docker_host: ""
|
||||
force_pull: false
|
||||
|
||||
host:
|
||||
workdir_parent: ""
|
||||
```
|
||||
|
||||
## Docker Deployment
|
||||
#### Capacity Configuration
|
||||
|
||||
The `capacity` setting controls how many jobs the runner can execute simultaneously:
|
||||
|
||||
- **Default**: 1 (one job at a time)
|
||||
- **Recommended**: 2-4 for multi-core systems
|
||||
- **Considerations**:
|
||||
- Each job consumes CPU, memory, and disk I/O
|
||||
- iOS/macOS builds are resource-intensive (start with 2)
|
||||
- Lighter builds (Node.js, Go) can handle higher capacity (4-6)
|
||||
- Monitor system load and adjust accordingly
|
||||
|
||||
**Example for different workloads:**
|
||||
|
||||
```yaml
|
||||
# Light builds (web apps, APIs)
|
||||
runner:
|
||||
capacity: 4
|
||||
|
||||
# Mixed builds
|
||||
runner:
|
||||
capacity: 2
|
||||
|
||||
# Heavy builds (iOS/macOS, large containers)
|
||||
runner:
|
||||
capacity: 1
|
||||
```
|
||||
|
||||
### 4. Register the Runner
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name act_runner \
|
||||
-e GITEA_INSTANCE_URL=https://your-gitea.com \
|
||||
-e GITEA_RUNNER_REGISTRATION_TOKEN=<token> \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v ./data:/data \
|
||||
gitcaddy/act_runner:latest
|
||||
./gitcaddy-runner register \
|
||||
--instance https://your-gitea-instance.com \
|
||||
--token YOUR_REGISTRATION_TOKEN \
|
||||
--name my-runner \
|
||||
--labels ubuntu-latest:docker://node:16-bullseye
|
||||
```
|
||||
|
||||
## GitCaddy Integration
|
||||
The registration token can be obtained from:
|
||||
- Gitea Admin Panel > Actions > Runners
|
||||
- Or repository Settings > Actions > Runners
|
||||
|
||||
This runner is designed to work with the [GitCaddy Gitea fork](https://git.marketally.com/gitcaddy/gitea), which provides:
|
||||
### 5. Start the Runner
|
||||
|
||||
- **Runner Capabilities API** (`/api/v2/repos/{owner}/{repo}/actions/runners/capabilities`)
|
||||
- **Workflow Validation API** for pre-flight checks
|
||||
- **Action Compatibility Database** for GitHub Actions mapping
|
||||
|
||||
### How It Works
|
||||
**Important:** Always specify the config file path with `-c` flag:
|
||||
|
||||
```bash
|
||||
./gitcaddy-runner daemon -c config.yaml
|
||||
```
|
||||
|
||||
act_runner Gitea AI Tool
|
||||
| | |
|
||||
| Declare + Capabilities | |
|
||||
|---------------------------->| |
|
||||
| | |
|
||||
| | GET /api/v2/.../caps |
|
||||
| |<------------------------|
|
||||
| | |
|
||||
| | Runner capabilities |
|
||||
| |------------------------>|
|
||||
| | |
|
||||
| | Generates workflow |
|
||||
| | with correct config |
|
||||
**Without the `-c` flag, the runner will use default settings and ignore your config.yaml!**
|
||||
|
||||
## Running as a Service
|
||||
|
||||
### macOS (launchd)
|
||||
|
||||
Create `~/Library/LaunchAgents/com.gitcaddy.runner.plist`:
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>com.gitcaddy.runner</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/path/to/gitcaddy-runner</string>
|
||||
<string>daemon</string>
|
||||
<string>-c</string>
|
||||
<string>/path/to/config.yaml</string>
|
||||
</array>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>/path/to/runner/directory</string>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/path/to/runner.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/path/to/runner.err</string>
|
||||
</dict>
|
||||
</plist>
|
||||
```
|
||||
|
||||
## Related Projects
|
||||
Load the service:
|
||||
|
||||
| Project | Description |
|
||||
|---------|-------------|
|
||||
| [gitcaddy/gitea](https://git.marketally.com/gitcaddy/gitea) | Gitea with AI-friendly enhancements |
|
||||
| [gitcaddy/actions-proto-go](https://git.marketally.com/gitcaddy/actions-proto-go) | Protocol definitions with capability support |
|
||||
```bash
|
||||
launchctl load ~/Library/LaunchAgents/com.gitcaddy.runner.plist
|
||||
```
|
||||
|
||||
## Upstream
|
||||
### Linux (systemd)
|
||||
|
||||
This project is a fork of [gitea.com/gitea/act_runner](https://gitea.com/gitea/act_runner). We contribute enhancements back to upstream where appropriate.
|
||||
Create `/etc/systemd/system/gitcaddy-runner.service`:
|
||||
|
||||
```ini
|
||||
[Unit]
|
||||
Description=GitCaddy Actions Runner
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=runner
|
||||
WorkingDirectory=/home/runner/gitcaddy-runner
|
||||
ExecStart=/home/runner/gitcaddy-runner/gitcaddy-runner daemon -c /home/runner/gitcaddy-runner/config.yaml
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
Enable and start:
|
||||
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable gitcaddy-runner
|
||||
sudo systemctl start gitcaddy-runner
|
||||
```
|
||||
|
||||
## Capability Detection
|
||||
|
||||
GitCaddy Runner automatically detects and reports system capabilities:
|
||||
|
||||
### Platform Information
|
||||
- Operating system (darwin, linux, windows)
|
||||
- Architecture (amd64, arm64)
|
||||
|
||||
### Container Runtime
|
||||
- Docker availability and version
|
||||
- Docker Compose support
|
||||
- Container runtime type
|
||||
|
||||
### Development Tools
|
||||
- Node.js, npm, yarn
|
||||
- Python, pip
|
||||
- Go
|
||||
- .NET
|
||||
- Ruby
|
||||
- Rust
|
||||
- Java
|
||||
- Swift (macOS)
|
||||
- Git, Make
|
||||
|
||||
### macOS-Specific
|
||||
- Xcode version and build
|
||||
- Available SDKs (iOS, macOS, tvOS, watchOS, visionOS)
|
||||
- Simulators
|
||||
- Code signing tools (codesign, pkgbuild)
|
||||
- Package managers (Homebrew, CocoaPods, Fastlane)
|
||||
|
||||
### System Resources
|
||||
- CPU cores
|
||||
- Load average
|
||||
- Disk space and usage
|
||||
- Network bandwidth
|
||||
|
||||
### Example Capabilities Output
|
||||
|
||||
```json
|
||||
{
|
||||
"os": "darwin",
|
||||
"arch": "arm64",
|
||||
"capacity": 2,
|
||||
"docker": true,
|
||||
"docker_compose": true,
|
||||
"container_runtime": "docker",
|
||||
"xcode": {
|
||||
"version": "15.2",
|
||||
"build": "15C500b",
|
||||
"sdks": ["iOS 17.2", "macOS 14.2"]
|
||||
},
|
||||
"tools": {
|
||||
"node": ["20.11"],
|
||||
"python": ["3.11"],
|
||||
"swift": ["5.9"]
|
||||
},
|
||||
"build_tools": ["fastlane", "cocoapods", "codesign"],
|
||||
"cpu": {
|
||||
"num_cpu": 10,
|
||||
"load_percent": 25.5
|
||||
},
|
||||
"disk": {
|
||||
"free_bytes": 54199226368,
|
||||
"used_percent": 77.89
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Configuration Reference
|
||||
|
||||
### Runner Section
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
|--------|------|---------|-------------|
|
||||
| `capacity` | int | 1 | Maximum concurrent jobs |
|
||||
| `timeout` | duration | 3h | Maximum job execution time |
|
||||
| `insecure` | bool | false | Allow insecure HTTPS |
|
||||
| `fetch_timeout` | duration | 5s | Timeout for fetching tasks |
|
||||
| `fetch_interval` | duration | 2s | Interval between task fetches |
|
||||
| `labels` | []string | [] | Runner labels for job matching |
|
||||
| `env_file` | string | .env | Environment variables file |
|
||||
|
||||
### Cache Section
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
|--------|------|---------|-------------|
|
||||
| `enabled` | bool | true | Enable cache support |
|
||||
| `dir` | string | "" | Cache directory path |
|
||||
| `host` | string | "" | External cache server host |
|
||||
| `port` | int | 0 | External cache server port |
|
||||
|
||||
### Container Section
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
|--------|------|---------|-------------|
|
||||
| `network` | string | "" | Docker network for containers |
|
||||
| `privileged` | bool | false | Run containers in privileged mode |
|
||||
| `docker_host` | string | "" | Custom Docker host |
|
||||
| `force_pull` | bool | false | Always pull latest images |
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Capacity Not Being Applied
|
||||
|
||||
**Problem:** Runner shows `"capacity":1` even though config.yaml has `capacity: 2`
|
||||
|
||||
**Solution:** Ensure you're using the `-c` flag when starting the daemon:
|
||||
|
||||
```bash
|
||||
# ✅ Correct
|
||||
./gitcaddy-runner daemon -c /path/to/config.yaml
|
||||
|
||||
# ❌ Wrong - uses defaults
|
||||
./gitcaddy-runner daemon
|
||||
```
|
||||
|
||||
Verify the config is being loaded:
|
||||
```bash
|
||||
# Check runner process
|
||||
ps aux | grep gitcaddy-runner
|
||||
|
||||
# Should show: gitcaddy-runner daemon -c /path/to/config.yaml
|
||||
```
|
||||
|
||||
### Docker Not Detected
|
||||
|
||||
**Problem:** Capabilities show `"docker":false` but Docker is installed
|
||||
|
||||
**Solution:**
|
||||
1. Ensure Docker Desktop/daemon is running:
|
||||
```bash
|
||||
docker ps
|
||||
```
|
||||
|
||||
2. Restart the runner after starting Docker:
|
||||
```bash
|
||||
./gitcaddy-runner daemon -c config.yaml
|
||||
```
|
||||
|
||||
3. Check Docker socket permissions:
|
||||
```bash
|
||||
ls -l /var/run/docker.sock
|
||||
```
|
||||
|
||||
### Jobs Not Running Concurrently
|
||||
|
||||
**Problem:** Jobs queue instead of running in parallel
|
||||
|
||||
**Checklist:**
|
||||
1. Verify capacity in capabilities output (check runner logs)
|
||||
2. Confirm config.yaml has `capacity > 1`
|
||||
3. Ensure runner was started with `-c config.yaml` flag
|
||||
4. Check system resources aren't maxed out
|
||||
5. Restart runner after config changes
|
||||
|
||||
### Runner Not Starting
|
||||
|
||||
**Problem:** Runner exits immediately or fails to start
|
||||
|
||||
**Common causes:**
|
||||
1. Invalid config.yaml syntax
|
||||
2. `.runner` file missing (run `register` first)
|
||||
3. Permission issues on working directory
|
||||
4. Invalid Gitea instance URL or token
|
||||
|
||||
**Debug steps:**
|
||||
```bash
|
||||
# Check config syntax
|
||||
./gitcaddy-runner generate-config > test-config.yaml
|
||||
diff config.yaml test-config.yaml
|
||||
|
||||
# Test with verbose logging
|
||||
./gitcaddy-runner daemon -c config.yaml --log-level debug
|
||||
|
||||
# Verify registration
|
||||
cat .runner
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
GitCaddy Runner supports environment variable configuration:
|
||||
|
||||
| Variable | Description | Example |
|
||||
|----------|-------------|---------|
|
||||
| `GITEA_RUNNER_CAPACITY` | Override capacity setting | `GITEA_RUNNER_CAPACITY=2` |
|
||||
| `GITEA_RUNNER_ENV_FILE` | Custom env file path | `GITEA_RUNNER_ENV_FILE=.env.prod` |
|
||||
|
||||
## API Integration
|
||||
|
||||
Query runner capabilities via Gitea API:
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: token YOUR_TOKEN" \
|
||||
https://your-gitea.com/api/v1/runners
|
||||
```
|
||||
|
||||
Use capabilities to generate compatible workflows:
|
||||
|
||||
```yaml
|
||||
# Example: Use capabilities to select appropriate runner
|
||||
name: Build
|
||||
on: [push]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ capabilities.os == 'darwin' && 'macos-latest' || 'ubuntu-latest' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! Please:
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a feature branch
|
||||
3. Make your changes
|
||||
4. Submit a pull request
|
||||
|
||||
## License
|
||||
|
||||
MIT License - see [LICENSE](LICENSE) for details.
|
||||
|
||||
## Support
|
||||
|
||||
- Issues: https://git.marketally.com/gitcaddy/gitcaddy-runner/issues
|
||||
- Discussions: https://git.marketally.com/gitcaddy/gitcaddy-runner/discussions
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
GitCaddy Runner is a hard fork of [Gitea's act_runner](https://gitea.com/gitea/act_runner), rebranded and enhanced with automated capability detection and reporting features for AI-friendly workflow generation.
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/pkg/artifact"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/artifact"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
||||
module gitea.com/gitea/act_runner
|
||||
module git.marketally.com/gitcaddy/gitcaddy-runner
|
||||
|
||||
go 1.24.0
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"os"
|
||||
"os/signal"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/pkg/config"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/config"
|
||||
|
||||
"github.com/nektos/act/pkg/artifactcache"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
@@ -10,9 +10,9 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/pkg/cleanup"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/config"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/ver"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/cleanup"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/config"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/ver"
|
||||
)
|
||||
|
||||
func Execute(ctx context.Context) {
|
||||
|
||||
@@ -22,14 +22,14 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/app/poll"
|
||||
"gitea.com/gitea/act_runner/internal/app/run"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/cleanup"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/client"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/config"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/envcheck"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/labels"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/ver"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/app/poll"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/app/run"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/cleanup"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/client"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/config"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/envcheck"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/labels"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/ver"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -20,10 +20,10 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/pkg/client"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/config"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/labels"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/ver"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/client"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/config"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/labels"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/ver"
|
||||
)
|
||||
|
||||
// runRegister registers a runner to the server
|
||||
|
||||
@@ -15,11 +15,11 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/app/run"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/cleanup"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/client"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/config"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/envcheck"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/app/run"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/cleanup"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/client"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/config"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/envcheck"
|
||||
)
|
||||
|
||||
type Poller struct {
|
||||
|
||||
@@ -22,11 +22,11 @@ import (
|
||||
"github.com/nektos/act/pkg/runner"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/pkg/client"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/config"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/labels"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/report"
|
||||
"gitea.com/gitea/act_runner/internal/pkg/ver"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/client"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/config"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/labels"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/report"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/ver"
|
||||
)
|
||||
|
||||
// Runner runs the pipeline.
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/pkg/config"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/config"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/pkg/client"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/client"
|
||||
)
|
||||
|
||||
type Reporter struct {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/pkg/client/mocks"
|
||||
"git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/client/mocks"
|
||||
)
|
||||
|
||||
func TestReporter_parseLogRow(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package ver
|
||||
|
||||
// go build -ldflags "-X gitea.com/gitea/act_runner/internal/pkg/ver.version=1.2.3"
|
||||
// go build -ldflags "-X git.marketally.com/gitcaddy/gitcaddy-runner/internal/pkg/ver.version=1.2.3"
|
||||
var version = "dev"
|
||||
|
||||
func Version() string {
|
||||
|
||||
Reference in New Issue
Block a user