D3: Building JavaScript Actions
GH-200 GitHub Actions exam practice questions · 10 flashcards
Question
Create JS action steps?
1 / 10
Tip: Space flips the card, ← / → navigate.
Show all 10 Building JavaScript Actions practice questions and answers
- Create JS action steps?action.yml, index.js using @actions/core, bundle, tag release.
- Reading input?core.getInput('name', { required: true }).
- Setting output?core.setOutput('name', value).
- Failing the action?core.setFailed(message).
- Logging helpers?core.info, core.warning, core.error, core.debug, core.group.
- Accessing event payload?github.context.payload.
- Authenticated API calls?github.getOctokit(token).
- Node runtime versions?node20 currently (node24 rolling out); node16 deprecated.
- pre and post scripts?pre: runs before main; post: cleanup after job (e.g. cache save).
- Testing JS actions?Unit tests with mocks plus a workflow that uses ./ locally.