You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
In some organizations, workflows have a lot of common custom steps across repositories/workflows. To ease with this, people create custom actions that wrap some of the other common actions so users don't have to copy-paste and update them manually across all workflows. Custom actions require access to programmatic API.
Describe the solution you'd like
Consider publishing this action to npm so it can be used programmatically.
It'll require a little refactoring. I propose requiring Input as an argument to run in main.js:
exportasyncfunctionrun(inps: Inputs){...}
The inputs can be passed to run in index.js, exposing an API from main.js (It might make sense to swap these file names - imports will become simpler).
Also, all @actions/* packages and other dependencies should probably not be bundled in the package, so they can be reused by other actions without duplication (tree shaking, if you will).
Describe alternatives you've considered
Clone and build the project in custom action to use the utils and instead of run() - which sucks.
Change the content of get-inputs.ts on clone with custom logic.
Additional context
GitHub published their @actions/cache action so other actions could use it without users requiring adding uses: @actions/cache step.
Thank you for creating such wonderful project!
The text was updated successfully, but these errors were encountered:
Shared functions and methods with those projects are also useful.
Also, all @actions/* packages and other dependencies should probably not be bundled in the package, so they can be reused by other actions without duplication (tree shaking, if you will).
I agree with this that is one of the important things for users.
GitHub published their @actions/cache action so other actions could use it without users requiring adding uses: @actions/cache step.
I was watching this process. It will be also helpful for our cases.
This week and next week are examination weeks for me. I will work on this and other issues from the next weekend.
Is your feature request related to a problem? Please describe
In some organizations, workflows have a lot of common custom steps across repositories/workflows. To ease with this, people create custom actions that wrap some of the other common actions so users don't have to copy-paste and update them manually across all workflows. Custom actions require access to programmatic API.
Describe the solution you'd like
Consider publishing this action to npm so it can be used programmatically.
It'll require a little refactoring. I propose requiring
Input
as an argument torun
inmain.js
:The inputs can be passed to
run
inindex.js
, exposing an API frommain.js
(It might make sense to swap these file names - imports will become simpler).Also, all
@actions/*
packages and other dependencies should probably not be bundled in the package, so they can be reused by other actions without duplication (tree shaking, if you will).Describe alternatives you've considered
run()
- which sucks.get-inputs.ts
on clone with custom logic.Additional context
GitHub published their
@actions/cache
action so other actions could use it without users requiring addinguses: @actions/cache
step.Thank you for creating such wonderful project!
The text was updated successfully, but these errors were encountered: