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

Deduplicate GitHub Actions Usage #11101

Closed
MikeMcQuaid opened this issue Apr 10, 2021 · 9 comments
Closed

Deduplicate GitHub Actions Usage #11101

MikeMcQuaid opened this issue Apr 10, 2021 · 9 comments
Labels
features New features help wanted We want help addressing this outdated PR was locked due to age

Comments

@MikeMcQuaid
Copy link
Member

Provide a detailed description of the proposed feature

Homebrew/homebrew-core and Homebrew/linuxbrew-core (and, to a much lesser extent, Homebrew/brew) have a huge amount of duplication and copy-paste between actions that differ in very small ways. These should be deduplicated and move of their logic moved to Homebrew/actions.

Composite actions (https://docs.github.com/en/actions/creating-actions/creating-a-composite-run-steps-action) may be a simple way to simplify some of these workflow files and keep them in sync.

What is the motivation for the feature?

Reducing complexity due to repeated duplication in GitHub Actions workflow files.

How will the feature be relevant to at least 90% of Homebrew users?

More reliable CI.

What alternatives to the feature have been considered?

Not doing this.

@GauthamGoli
Copy link
Contributor

I've spent some time on this, posting the findings here.

Composite actions don't support setting conditionals, continue-on-error, timeout-minutes, "uses", and secrets on individual steps within a composite action right now. (Reference: actions/runner#646)

The actions which we want to be deduplicated use one of the above unsupported statements/features. We'll have to park this idea until then.

As of now, we can only use composite actions to replace a bunch of run statements, which is a very narrow use case.

@MikeMcQuaid
Copy link
Member Author

Thanks @GauthamGoli! Looks like composite actions are a non-starter for now, indeed. Do you have any other ideas on how to deduplicate? Perhaps we could have e.g. a single workflow that takes more inputs?

@GauthamGoli
Copy link
Contributor

@MikeMcQuaid yeah, using a single workflow seems promising. I will open a PR if it works!

@xakep8
Copy link

xakep8 commented Apr 15, 2022

Can we do something like process scheduling, like in apt?

@MikeMcQuaid
Copy link
Member Author

@xakep8 I'm not sure I understand the question, please elaborate!

@mohzulfikar
Copy link

Hi there, I want to ask about this issue. From what I understand, homebrew has a custom action repository in here. So, if I want to create new composite action I should place the composite action in there and then use it on other repository. Is that the correct flow?

@dawidd6
Copy link
Member

dawidd6 commented Jun 15, 2022

Yes

@mohzulfikar
Copy link

Thank you

@MikeMcQuaid
Copy link
Member Author

I think this is as done as it needs to be.

@github-actions github-actions bot added the outdated PR was locked due to age label Mar 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
features New features help wanted We want help addressing this outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

5 participants