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

Implement shared workflows #30

Open
2 of 10 tasks
bstrie opened this issue Nov 16, 2022 · 5 comments
Open
2 of 10 tasks

Implement shared workflows #30

bstrie opened this issue Nov 16, 2022 · 5 comments
Assignees

Comments

@bstrie
Copy link
Contributor

bstrie commented Nov 16, 2022

Github supports sharing workflows between repos in an organization:

https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/reusing-workflows

https://docs.github.com/en/enterprise-cloud@latest/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise

Make a list of workflows that should be shared among multiple repos (commit message checker, license checker, cargo clippy, cargo fmt, dependabot, etc.) and implement them as shared workflows so that we can avoid duplicating them across every repo.

Candidates for shared workflows:

The first step for each of these is to define them as shared workflows in this repo. Once that is done, we should go through every other repo and reference the workflows from any repo that wants to use these.

@dpal dpal assigned dpal and bstrie Nov 17, 2022
@dpal dpal added this to Enarx Board Nov 22, 2022
@dpal dpal moved this to New in Enarx Board Nov 22, 2022
@dpal dpal moved this from New to Backlog in Enarx Board Nov 23, 2022
@dpal dpal moved this from Backlog to Scheduled in Enarx Board Nov 23, 2022
@dpal dpal moved this from Scheduled to In Progress in Enarx Board Nov 29, 2022
@dpal dpal unassigned bstrie Dec 1, 2022
@dpal
Copy link

dpal commented Dec 1, 2022

I am taking over this ticket.
The strategy is:

  • Create all the needed shareable workflows in the .github repository (test them in a separate organization)
  • Use the "noted" repo as the first repo to convert to shared workflows. Make sure that everything is polished.
  • Replicate the same configuration/cleanup for other repositories while also cleaning the old unused workflows.

@bstrie
Copy link
Contributor Author

bstrie commented Dec 1, 2022

Feel free to tag me as the reviewer for all of these PRs.

@dpal
Copy link

dpal commented Dec 2, 2022

@bstrie I started working with my test organization and repeated the example with the commisery. However, I think I found an issue in your approach. As written the rules do not apply to the .github repo when one creates patches for it. So we need different files in the workflows directory in the repo:

  • files with the reusable workflows
  • files using the reusable workflows for that repository

Also, I played with the automerge. I found this:
https://github.com/marketplace/actions/merge-pull-requests-automerge-action
But I am not sure this is what we want.
We do not want to have to create labels. It is more complex than clicking the button once all checks are done.

This brings a different question.
How do we know which implementation for the action to choose?
If it comes from there github - OK. But what if it comes from some other place?
How do we know it is a trustworthy and maintained place?
Do we look at the stars of the repo?
Do we create a fork and use our own copy?
What would be the strategy?

@dpal
Copy link

dpal commented Dec 2, 2022

Next steps:

  • investigate if shared workflows can be moved to a subdirectory
  • use enarx repo as a reference point for the workflow implementations
  • start with non-cargo ones
  • figure out tokens and secrets needed/expected

@rvolosatovs
Copy link
Member

Refs #37 #36

@dpal dpal moved this from In Progress to Priority (Epic) in Enarx Board Jan 12, 2023
@enarx enarx deleted a comment from bstrie Jan 18, 2023
@dpal dpal moved this from Priority (Epic) to Standby (next sprint) in Enarx Board Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Standby (next sprint)
Development

No branches or pull requests

3 participants