Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

ci: validate release workflows with act

JerrettDavisd8c2ae88cdf7
diff --git a/.github/act/docker-version.json b/.github/act/docker-version.json
new file mode 100644
index 000000000..082cbaf34
--- /dev/null
+++ b/.github/act/docker-version.json
@@ -0,0 +1,5 @@
+{
+ "inputs": {
+ "version": "0.6.1"
+ }
+}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f02021f00..61bff5ef4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -223,3 +223,21 @@ jobs:
- uses: wagoid/commitlint-github-action@v5
with:
configFile: .commitlintrc.json
+
+ workflow-validation:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install actionlint
+ run: |
+ curl -fsSL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash | bash
+ sudo mv ./actionlint /usr/local/bin/actionlint
+
+ - name: Install act
+ run: |
+ curl -fsSL https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
+
+ - name: Validate workflow files
+ run: |
+ bash scripts/validate-workflows.sh
diff --git a/docs/content/docs/releases.mdx b/docs/content/docs/releases.mdx
index 7b4b5cf64..016c9992c 100644
--- a/docs/content/docs/releases.mdx
+++ b/docs/content/docs/releases.mdx
@@ -185,7 +185,7 @@ winget install actionlint
### Dry-run Test
```bash
-act -W .github/workflows/release.yml -e .github/act/dry-run.json
+act workflow_dispatch -W .github/workflows/release.yml -e .github/act/dry-run.json
```
This runs the full workflow end-to-end with `dry_run=true`, skipping all publish steps.
@@ -193,11 +193,19 @@ This runs the full workflow end-to-end with `dry_run=true`, skipping all publish
### Test a Specific Commit Type
```bash
-act -W .github/workflows/release.yml -e .github/act/push-feat.json
+act push -W .github/workflows/release.yml -e .github/act/push-feat.json
```
The `push-feat.json` event file simulates a `feat:` commit on `main`.
+### Validate the Release and Docker Workflows
+
+```bash
+bash scripts/validate-workflows.sh
+```
+
+This runs `actionlint` plus `act -n` against the release and Docker workflows using the checked-in `.github/act/*.json` event fixtures. CI runs the same script in the `workflow-validation` job so branch changes to release automation are validated before merge.
+
### Local Secrets
```bash
@@ -220,6 +228,8 @@ cp .env.act.example .env.act
| `scripts/verify-versions.py` | Pre-release version alignment check |
| `.github/act/dry-run.json` | `act` event file for dry-run testing |
| `.github/act/push-feat.json` | `act` event file for feat commit testing |
+| `.github/act/docker-version.json` | `act` event file for Docker workflow validation |
+| `scripts/validate-workflows.sh` | Shared `actionlint` + `act -n` workflow validation script |
| `.actrc` | Default `act` flags (Ubuntu runner, reuse, quiet) |
| `.actrc.local.example` | Local `act` override template |
diff --git a/scripts/validate-workflows.sh b/scripts/validate-workflows.sh
new file mode 100644
index 000000000..c6a59b93d
--- /dev/null
+++ b/scripts/validate-workflows.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+actionlint .github/workflows/*.yml
+
+act workflow_dispatch -W .github/workflows/release.yml -e .github/act/dry-run.json -n
+act push -W .github/workflows/release.yml -e .github/act/push-feat.json -n
+act workflow_dispatch -W .github/workflows/docker.yml -e .github/act/docker-version.json -n