Call another github action like an async function call
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the enhancement
Consider development of a composite GitHub action using the javascript toolkit. In that case, the steps would involve also calling other existing actions as if run from the action yaml.
Code Snippet
Something along the lines of:
import * as core from '@actions/core';
async function run() {
await core.callAction("<name", {input_arg1: "v1", input_arg2: "v2", ...})
// access any output from this action call by calling ??
}
Additional information
The idea is to be able to specify a composite action entirely in javascript. Given that a composite action is treated like a regular action, is there a way to create composite actions using the javascript SDK?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the @actions/core JavaScript toolkit and the GitHub Actions composite-action model described in the issue. Determine whether one action can invoke another programmatically and how its outputs would be exposed; done means a clearly scoped, supported approach or implementation plan.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, javascript
- Domain
- ci-cd, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100