Commit f7762d0
committed
fix(action): empty defaults for github-context inputs (composite actions reject expressions in input defaults)
CI failure on PR #74's Action smoke job:
TemplateValidationException: Unrecognized named-value: 'github'.
Located at position 1 within expression: github.base_ref / github.token
GitHub composite actions do NOT allow ${{ github.* }} expressions in
input defaults. Only `runs:` step expressions can reference the github
context. Two inputs were affected:
- `audit-base`: now defaults to "". The existing run step already does
`BASE="${AUDIT_BASE:-$BASE_REF}"` where `BASE_REF: ${{ github.base_ref }}`
is set as an env var (legal in step env blocks), so empty-input → PR
base_ref behavior is preserved.
- `token`: now defaults to "". Two call sites (`upload-sarif` step's
`token:` arg + `pr-comment` step's `GH_TOKEN`) now use
`${{ inputs.token != '' && inputs.token || github.token }}` to fall
back to `github.token` when unset.
Both inputs' descriptions updated to document the empty-falls-back
behavior so consumers know what to expect.1 parent e35f820 commit f7762d0
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| |||
0 commit comments