A custom JavaScript action uses @actions/core. It reads a required configuration input and should fail clearly when the caller omits it. Which implementation best enforces that contract?

Published
  1. Print a warning and call process.exit(0) whenever the input is empty.
  2. Read the input with core.getInput(name, { required: true }) and handle failures with core.setFailed.
  3. Set required: true in action.yml and assume that alone always performs runtime validation.
  4. Use a default empty string and continue as if the configuration were valid.

Comments — 0