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

Enable use from other Actions #58

Closed
reitzig opened this issue May 29, 2020 · 6 comments
Closed

Enable use from other Actions #58

reitzig opened this issue May 29, 2020 · 6 comments
Assignees

Comments

@reitzig
Copy link

reitzig commented May 29, 2020

Sometimes, we do not care about installing Ruby per se: we want some tool that happens to use Ruby. One example is building a static website with Hugo and Asciidoc -- which happens to depend on asciidoctor as an external dependency, despite neither Hugo devs nor page creators seeing a single line of Ruby.

So, we want to install asciidoctor and not care about how it's done, e.g. through this action I just wrote. Unfortunately, since actions can't call each other, every user has to repeat the call of ruby/setup-ruby.

A recommended workaround seems to be for actions to factor out their core functionality into functions that can be imported and called from other actions.

@dentarg
Copy link

dentarg commented May 29, 2020

There was a discussion about this in #33

@eregon
Copy link
Member

eregon commented May 29, 2020

Would the approach mentioned in #33 (comment) work for you?

@reitzig
Copy link
Author

reitzig commented Jun 2, 2020

@dentarg @eregon Thanks for the pointer!

That would probably work but I don't think it's already in the nicest form possible. Engaging there.

@dentarg
Copy link

dentarg commented Jun 3, 2020

This seems to be on the roadmap for GitHub Actions: actions/runner#438

eregon added a commit that referenced this issue Jun 6, 2020
…ctions

* Inputs are passed as simple object properties.
* It is recommended to expose the same inputs for other actions.
* See #58 and #33.
@eregon eregon self-assigned this Jun 6, 2020
@eregon
Copy link
Member

eregon commented Jun 6, 2020

I think with #33 (comment) that's all that's really needed to use this action from other actions.

I'd like to close this issue.
Feel free to open other issues if you have specific issues.
I'd rather not have to also maintain an npm package unless there is a clear reason using https://raw.githubusercontent.com/ruby/setup-ruby/v1/dist/index.js doesn't work.

@eregon eregon closed this as completed Jun 6, 2020
@reitzig
Copy link
Author

reitzig commented Oct 20, 2020

FWIW, actions/runner#646 seems to be working towards a first-class solution.

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

No branches or pull requests

3 participants