StaffCoder
GitHub Actions
8 modules · 24 challengesSign up
Module 3 of 8 · 3 challenges

GitHub Actions Contexts, Expressions & Variables

Resolve configuration at every level: environment layers, repository variables, secrets, expressions and step outputs feeding the next job.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

3 challenges

Env, Vars And Secrets

Sign up to unlock
—No data yeteasy
About this challenge

Move a hardcoded signing key and repeated configuration out of a workflow file: declare env at the workflow, job and step levels so the innermost wins, take the region from a repository variable and the signing key from a secret, sign the release notes with it, and leave the key in no workspace file and no literal credential in the workflow.

Solved in a browser IDE and graded by tests. Sign up to solve

Expressions And Step Outputs

Sign up to unlock
—No data yeteasy
About this challenge

Compute a build's version values once and publish them: short SHA, formatted build tag, dependency fingerprint and build id through GITHUB_OUTPUT, the fingerprint exported through GITHUB_ENV and a tool directory through GITHUB_PATH, a metadata record assembled from those outputs and the github and runner contexts, and a step that runs only for the channel a fromJSON-parsed config names.

Solved in a browser IDE and graded by tests. Sign up to solve

The Build Metadata Stamp

STAR
Solving it completes the module
—No data yeteasy
About this challenge

Produce a signed build stamp whose every value is derived: env layered across workflow, job and step, the region from a repository variable, the short SHA and build tag from contexts and format, the fingerprint computed once and shared through a step output and exported env, a tool added to PATH, a nightly section gated on a fromJSON config value, and the finished stamp signed with a secret so that signing before the appends invalidates it.

Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.