Open gonzalo-bulnes opened 1 year ago
💡 Worth looking into composite actions too, there is a mention in that same article: https://github.blog/2022-02-10-using-reusable-workflows-github-actions/#key-differences-between-reusable-workflows-and-composite-actions
I looked into reusable workflows, I think they're like 90% what we want, which IMO is good enough.
Basically you add on: [workflow_call]
to your workflow, and then it can be called by others. The catch is that it must be in the .github/workflows
directory, which means that the repository its in has to actually support those jobs, it can't just be a generic repository like this one. So we would probably keep the actual docs workflow in say, securedrop-docs, and have the other docs repos refer to that one.
Some boilerplate is still needed in the callee repository (e.g. https://github.com/legoktm/test/blob/08a3d32391d843d1183aaadfd9b4500e08e6f9fd/.github/workflows/ci.yml), but it seems pretty minimal that we can just copy paste it.
GitHub Actions supports reusing workflow across repositories: https://github.blog/2022-02-10-using-reusable-workflows-github-actions/