Flashcardsfor IT Certifications

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.

Last updated: · Report an error on this page

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