Closed iainlane closed 1 year ago
Oh, yeah, I've been bitten by this one as well. Have to duplicate long lists of include/exclude paths in all my action triggers, very tedious.
As you say, this is likely to be a tough one, as I wouldn't be surprised if by the time the YAML is finished being parsed, the anchors have been dereferenced and there's no indication that there ever was an anchor.
I've taken a brief look at this issue today, and it looks like, indeed, that anchors do indeed get dereferenced inside the YAML parser, so action-validator
can't tell there ever was an anchor, and there's no way to ask the YAML parser to not support anchors (because to do that is bonkers, obvs). I surfaced this issue which appears to the canonical place to whinge about a lack of support for anchors, and has some backstory as to why they're not supported, a very half-hearted commitment over a year ago from someone at GitHub to do something about it, and some possible workarounds. In the meantime, I'm just going to have to close this issue as "practically impossible to support", sadly.
My workflow had some parameters like this:
GitHub sadly rejects this, because it isn't using full YAML. (See here)
But
action-validator
accepts this action:probably a tough one, as this isn't about the schema but not accepting conformant YAML!