Open thehenrymcintosh opened 1 year ago
Possible, yes. It would be a fair amount of work, though, as I doubt there's a Rust library that implements parsing+validation for the particular syntax used by GitHub, so that would need to be built.
I'm going to mark this as "PR welcome", as I think this would be a great addition to action-validator
, but I don't have the inclination to do the work myself. After I've been bitten by a couple of syntax errors in expressions, I might change my mind, of course...
Ok, probably a bit outside my capacity at the moment to take on something like that, but would be a great addition I agree. Hopefully I'll get a window of time to take it on but unlikely to be soon, maybe when I get bitten by syntax errors I might change my mind too 😅
Here's a similar permutation, where double quotes aren't allowed (GitHub docs for string
):
env:
A1: ${{ "invalid" }}
A2: ${{ 'valid' }}
Feature Request
In GithubActions, this is a valid example of an expression:
and this is not, because of the missing closing bracket
But this is not caught by the action-validator. Would it be possible to extend this to also check that expressions are valid?