Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
GitHub · GH-200

Contexts and expressions

GH-200 · Lesson 4 of 16 · 27:25

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

In this lesson

Prepare for the GH-200 exam (GitHub Actions). In this lesson: the github, env, vars, secrets, inputs, job, steps, runner, strategy, matrix, and needs contexts, untrusted input in github.event, expressions with operators and functions (startsWith, fromJSON, hashFiles, case, object filters), when expressions are evaluated and which contexts each key accepts, keeping secrets out of logs, and pinning actions to a full-length SHA, with immutable releases. Includes three original practice questions.

Preview the topics
  • A Contoso deploy job should only run for tags that start with v, but its condition is github.ref == ’v*’, and it never runs. Which condition works?
  • A Contoso job should only publish when the STORE_KEY secret exists, and its condition reads the secrets context directly in an if. The workflow is rejected as invalid. What’s the recommended fix?
  • Contoso’s security team wants a third-party action in production to run exactly the code they reviewed, even if the action’s repository is later compromised. How should workflows reference it?