Flashcardsfor IT Certifications

D1: Expressions & Evaluation

GH-200 GitHub Actions exam practice questions · 10 flashcards

Question
Expression syntax?
1 / 10

Tip: Space flips the card, ← / → navigate.

Last updated: · Report an error on this page

Show all 10 Expressions & Evaluation practice questions and answers
  1. Expression syntax?
    ${{ <expression> }}; if: conditions may omit the braces.
  2. Operators?
    ==, !=, <, >, &&, ||, !, ().
  3. Functions?
    contains(), startsWith(), endsWith(), format(), join(), toJSON(), fromJSON(), hashFiles().
  4. hashFiles()?
    Hash of matched files, used for cache keys.
  5. Literal types?
    boolean, null, number, string ('single quotes').
  6. Static vs runtime evaluation?
    Some contexts (e.g. env in some keys, matrix definition) are evaluated at parse; most step expressions evaluate at runtime on the runner.
  7. Where can't secrets be used?
    In if: conditions directly; map to env then check.
  8. Preventing secret leakage?
    Don't echo secrets, avoid toJSON(secrets), mask derived values, avoid passing secrets via command-line args.
  9. Script injection risk with expressions?
    ${{ github.event.issue.title }} inside run: injects untrusted text — use env vars instead.
  10. Object filters?
    github.event.commits.*.message to select arrays of properties.