Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider reusable workflows! #4

Open
gonzalo-bulnes opened this issue Mar 9, 2023 · 2 comments
Open

Consider reusable workflows! #4

gonzalo-bulnes opened this issue Mar 9, 2023 · 2 comments

Comments

@gonzalo-bulnes
Copy link
Contributor

GitHub Actions supports reusing workflow across repositories:
https://github.blog/2022-02-10-using-reusable-workflows-github-actions/

@gonzalo-bulnes
Copy link
Contributor Author

💡 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

@legoktm
Copy link
Member

legoktm commented Apr 12, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants