@mizchi/actrun 0.9.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -6
- package/dist/actrun.js +226 -210
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ nix_packages = ["python312", "jq"]
|
|
|
75
75
|
container_runtime = "docker"
|
|
76
76
|
|
|
77
77
|
# Affected file patterns per workflow
|
|
78
|
-
# [affected.ci.yml]
|
|
78
|
+
# [affected."ci.yml"]
|
|
79
79
|
# patterns = ["src/**", "package.json"]
|
|
80
80
|
```
|
|
81
81
|
|
|
@@ -117,7 +117,7 @@ actrun cache prune --key <key> # Delete cache entry
|
|
|
117
117
|
|------|-------------|
|
|
118
118
|
| `--dry-run` | Show execution plan without running |
|
|
119
119
|
| `--skip-action <pattern>` | Skip actions matching pattern (repeatable) |
|
|
120
|
-
| `--workspace-mode <mode>` | `
|
|
120
|
+
| `--workspace-mode <mode>` | `worktree` (default), `local`, `tmp`, `docker` |
|
|
121
121
|
| `--repo <path>` | Run from a git repository |
|
|
122
122
|
| `--event <path>` | Push event JSON file |
|
|
123
123
|
| `--repository <owner/repo>` | GitHub repository name |
|
|
@@ -127,16 +127,53 @@ actrun cache prune --key <key> # Delete cache entry
|
|
|
127
127
|
| `--no-nix` | Disable nix wrapping even if flake.nix/shell.nix exists |
|
|
128
128
|
| `--nix-packages <pkgs>` | Ad-hoc nix packages (space-separated) |
|
|
129
129
|
| `--container-runtime <name>` | Container runtime: `docker`, `podman`, `container`, `lima`, `nerdctl` |
|
|
130
|
-
| `--affected` | Only run if files matching
|
|
130
|
+
| `--affected [base]` | Only run if files matching patterns changed (see below) |
|
|
131
131
|
| `--retry` | Re-run only failed jobs from the latest run |
|
|
132
|
-
| `--json` | JSON output for read commands |
|
|
132
|
+
| `--json` | JSON output for read commands and `--dry-run` |
|
|
133
|
+
|
|
134
|
+
## Affected Runs
|
|
135
|
+
|
|
136
|
+
Skip workflows when no relevant files have changed. Patterns are resolved in order:
|
|
137
|
+
|
|
138
|
+
1. `actrun.toml` `[affected."<workflow>"]` patterns
|
|
139
|
+
2. `on:push:paths` from the workflow file (automatic fallback)
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Compare against last successful run (default)
|
|
143
|
+
actrun ci.yml --affected
|
|
144
|
+
|
|
145
|
+
# Compare against a specific rev
|
|
146
|
+
actrun ci.yml --affected HEAD~3
|
|
147
|
+
actrun ci.yml --affected abc1234
|
|
148
|
+
|
|
149
|
+
# Preview what would happen (shows plan even if skipped)
|
|
150
|
+
actrun ci.yml --affected HEAD~1 --dry-run
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Configure patterns in `actrun.toml`:
|
|
154
|
+
|
|
155
|
+
```toml
|
|
156
|
+
[affected."ci.yml"]
|
|
157
|
+
patterns = ["src/**", "package.json"]
|
|
158
|
+
|
|
159
|
+
[affected.".github/workflows/lint.yml"]
|
|
160
|
+
patterns = ["src/**", "*.config.*"]
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
If `actrun.toml` has no patterns, `on:push:paths` from the workflow is used automatically:
|
|
164
|
+
|
|
165
|
+
```yaml
|
|
166
|
+
on:
|
|
167
|
+
push:
|
|
168
|
+
paths: ["src/**", "*.toml"] # actrun --affected uses these
|
|
169
|
+
```
|
|
133
170
|
|
|
134
171
|
## Workspace Modes
|
|
135
172
|
|
|
136
173
|
| Mode | Description |
|
|
137
174
|
|------|-------------|
|
|
138
|
-
| `local` | Run in-place in the current directory
|
|
139
|
-
| `worktree` | Create an isolated `git worktree` for execution |
|
|
175
|
+
| `local` | Run in-place in the current directory |
|
|
176
|
+
| `worktree` | Create an isolated `git worktree` for execution (default) |
|
|
140
177
|
| `tmp` | Clone to a temp directory via `git clone` |
|
|
141
178
|
| `docker` | Run in a Docker container |
|
|
142
179
|
|