opensearch-project / .github

Provides templates and resources for other OpenSearch project repositories.
Apache License 2.0
28 stars 71 forks source link

[FEATURE] Managing Reusable GitHub Actions #105

Open peternied opened 1 year ago

peternied commented 1 year ago

Is your feature request related to a problem?

Lots of teams have to adopt very similar workflows for things such as:

What solution would you like?

GitHub Actions support Composite actions [1], there has already been adoption in non-reusable ways [2]. The main limit is how to consume these actions in the OpenSearch-Project.

Proposal One - Single Project-Wide 'Actions' Repository

Create a new repository where all actions are added like ./install-opensearch/action.yml these would be referenced in an GitHub Action like uses: opensearch-project/actions/install-opensearch@install-opensearch-v1.

Pros:

Cons:

Proposal Two - Reuse OpenSearch-Build Repository

Similar to proposal one, but instead reuse the OpenSearch-Build repository. This is already a focal point for many build/test workflow related tasks.

Pros:

Cons:

Proposal Three - Create a repository for each action

Instead of centralization actions, instead build them out into separate repositories

Pros:

Cons:

Proposal Four - Create personal repositories for actions

Similar to proposal three, but make them as personal projects

Pros:

Cons:

Do you have any additional context?

peternied commented 1 year ago

I am going to keep making more personal repositories for common actions, but it would be nice if we had a perspective on actions specific for OpenSearch-Project

e.g.

peternied commented 1 year ago

@bbarani @VachaShah @dblock What do y'all think?

dblock commented 1 year ago

I think opensearch-github-actions is a bit of a "technology" catch-all vs. a purpose catch-all. Typically GHA live in their own repos each and release, e.g. https://github.com/dblock/create-a-github-issue. Is there a reason not to author a proper opensearch-install GHA in its own repo with its own release lifecycle?

For completeness, a lot of build infrastructure in OpenSearch and OpenSearch Dashboards inherits scripts (gradle or otherwise) from the core repos. Is there an option to put shared actions into OpenSearch and OpenSearch-Dashboards repos? Similarly, is https://github.com/opensearch-project/opensearch-build-libraries another option?

peternied commented 1 year ago

FYI @cwperks