Workflow pin: refuses success() and any if: continued past its line, the way block scalars are refused
Soul s2 found 'success() || c' and plain or quoted if: values continued on a following line passing the pin. Any status function now refuses, and stepCondition reports an if: whose value continues (block scalar or a deeper-indented next line) as multi-line, which the pin refuses. Soul's four probe forms are asserted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8ed6095a90
commit
942e4033b2
2 changed files with 37 additions and 19 deletions
|
|
@ -284,10 +284,12 @@ Each of those runs the check's own tests first, and the tests pin that order.
|
|||
In `publish-packages.yml` the test step must run whenever the job's Publish
|
||||
step does. The pin proves that from the text of the two `if:` conditions, so it
|
||||
accepts only three shapes: no `if:` on the test step, the same `if:` on both,
|
||||
or Publish's `if:` as the test step's followed by ` && ` with no `||`. A
|
||||
block-scalar `if:` (`>-`, `|`) is refused, and so is a Publish `if:` calling
|
||||
`always()`, `cancelled()` or `failure()`, which would publish after the tests
|
||||
failed. Matching text rather than parsing GitHub's expression language also
|
||||
or Publish's `if:` as the test step's followed by ` && ` with no `||`. The pin
|
||||
reads one line, so a multi-line `if:` is refused: a block scalar (`>-`, `|`),
|
||||
or a plain or quoted value continued on the next line. So is a Publish `if:`
|
||||
calling `always()`, `cancelled()`, `failure()` or `success()`: any status
|
||||
function replaces the implicit `success()`, so `success() || c` would publish
|
||||
after the tests failed, and `success() && c` says nothing `c` alone does not. Matching text rather than parsing GitHub's expression language also
|
||||
refuses some sound conditions: a parenthesised `S && (c || d)`, conjuncts in
|
||||
another order, and a condition wrapped in `${{ }}` or spaced differently on one
|
||||
step only. Rewrite those into an accepted shape; a wrong pass would publish a
|
||||
|
|
|
|||
Loading…
Reference in a new issue