sandpaper icon indicating copy to clipboard operation
sandpaper copied to clipboard

GitHub Actions: consider centralizing workflows

Open zkamvar opened this issue 5 years ago • 1 comments

One of the main things that's currently painful in the lesson template is the way it's updated: via pull request.

I've been able to split away the components for updating it into two packages, {sandpaper} for the engine and {varnish} for the styling, but there is still a third, deployment component that are the github actions.

In out current mode of thinking, we are duplicating the actions across the repositories, but that's problematic because it means that they can be modified and we want to avoid doing that because we know that they will need to be updated in the future. This comment outlines the issue quite well: https://github.community/t/being-dry-centralized-workflows/16548

One solution is creating a stand-alone Composite action: https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/creating-a-composite-run-steps-action

The requirement for this is to make sure that these actions do not require an extra secret to be added to the repos (or maybe that's not so bad with the tradeoff of having smaller actions).

zkamvar avatar Dec 30 '20 15:12 zkamvar

I've started a test repository with a companion:

action: https://github.com/zkamvar/glowing-spork test: https://github.com/zkamvar/symmetrical-spoon

Since the token for the checkout action persists, I am able to conditionally push to the repo. This means that it is possible for me to package most of the guts of the actions into separate repos.

zkamvar avatar Dec 30 '20 18:12 zkamvar

See https://github.com/carpentries/sandpaper/issues/199

ErinBecker avatar Jul 26 '24 15:07 ErinBecker