TypeTogether / Playwrite

Sensei primary repository.
SIL Open Font License 1.1
104 stars 4 forks source link

Simplify action, and only commit fonts if sources changed #58

Closed simoncozens closed 4 months ago

simoncozens commented 4 months ago

My original plan was to have two jobs in the same workflow which talked to each other, and one of the jobs (to commit the fonts) would only run if the sources changed. But actually we can't do that: we can't put on: paths: sources on a job, only on a workflow. So instead, we use a third-party action (https://github.com/dorny/paths-filter) to check which paths changed in the PR/push, and set a variable to true if the sources changed. Then we can make the "commit build fonts" step conditional on this variable.

The original action file was taken from googlefonts-project-template and so it was written in a way that would work in any repository. Since this is now specialised for Playwrite, we can simplify it a bit. I've also added some comments and step names to make it a bit clearer.

vv-monsalve commented 4 months ago

Thank you, Simon! Nice paths-filter finding :)

casasin commented 4 months ago

Very cool @simoncozens !