Commit 39015bf
authored
Replace github-script with file-based approach to avoid large JSON output max limit (#177)
## Summary
Replaces the `actions/github-script@v8` "Set results output" step with a
file-based bash/node approach to avoid Linux's `ARG_MAX` limit when
processing large JSON payloads (~138KB+).
## Problem
The previous implementation interpolated large `filings` JSON directly
as a CLI argument to `node` via `github-script`. This exceeded the
`ARG_MAX` limit on Linux runners, causing:
```
An error occurred trying to start process 'node' ... Argument list too long
```
## Changes
1. **Replaced `github-script@v8` step** with two bash steps:
- A step that writes filings/fixings to temp files via heredocs (avoids
CLI arg limits)
- A step that processes the data via a node heredoc script and writes
`scanner-results.json`
2. **Added `results_file` output** — a new composite action output
pointing to the JSON file, for consumers that need to handle large
datasets without output size limits.
3. **Switched cache saving** from the value-based `gh-cache/cache`
action to the file-based `gh-cache/save` action, copying
`scanner-results.json` to the cache key path first.
## Backward compatibility
- The `results` output is still set via `GITHUB_OUTPUT` heredoc
delimiter for existing consumers.
- The new `results_file` output is additive and opt-in.
[Staff only] Resolves github/accessibility#103542 files changed
+55
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
135 | 149 | | |
136 | 150 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
153 | 166 | | |
154 | | - | |
155 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
156 | 184 | | |
157 | 185 | | |
158 | 186 | | |
159 | 187 | | |
160 | 188 | | |
161 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
162 | 196 | | |
163 | | - | |
| 197 | + | |
164 | 198 | | |
165 | | - | |
166 | | - | |
| 199 | + | |
167 | 200 | | |
168 | 201 | | |
169 | 202 | | |
| |||
0 commit comments