RobbieMcKinstry / punchcard

Removing Punchcard workflows from the DevOps Loop!
MIT License
0 stars 0 forks source link

Parse All Top-Level GHA Constructs #13

Open RobbieMcKinstry opened 1 year ago

RobbieMcKinstry commented 1 year ago

GHA Workflows have a well-defined schema. The schema consists of a number of top-level constructs: jobs, environment, etc. Once Punchcard can parse top-level constructs, all Workflow YAML files should be at least somewhat parsable, even if they don't get the details perfect.

This issue tracks the remaining work involved in parsing all top-level constructs.

env is an ordered map from strings to strings, making it simple to parse. jobs, on the other hand, have a large schema, requiring a lot of work. permissions will be easy to implement using an enum.

RobbieMcKinstry commented 1 year ago

Note: a number of the bugs in this implement can be fixed with https://serde.rs/enum-representations.html#untagged I'll have to come back to these in the future. For now, we'll soldier along until we find a workflow that doesn't parse correctly.