GH-200 · Question #66
What is the most suitable action type for a custom action written in TypeScript?
The correct answer is D. JavaScript action. TypeScript compiles down to JavaScript, making JavaScript actions the natural and most suitable custom action type for TypeScript code. You write and develop in TypeScript, then compile (tsc) to JavaScript before publishing. GitHub Actions runners execute the compiled JavaScript
Question
What is the most suitable action type for a custom action written in TypeScript?
Options
- ADocker container action
- BBash script action
- Ccomposite run step
- DJavaScript action
How the community answered
(25 responses)- A8% (2)
- B4% (1)
- D88% (22)
Explanation
TypeScript compiles down to JavaScript, making JavaScript actions the natural and most suitable custom action type for TypeScript code. You write and develop in TypeScript, then compile (tsc) to JavaScript before publishing. GitHub Actions runners execute the compiled JavaScript directly without needing Docker or any additional runtime. Docker container actions (A) add unnecessary complexity for TypeScript. 'Bash script action' (B) is not a formal action type. Composite run steps (C) are for combining shell commands and existing actions, not for TypeScript logic.
Topics
Community Discussion
No community discussion yet for this question.