What is the difference between job-level `env` and `steps[*].env`, and can a job's `env` reference `matrix`?
BeginnerConceptJobs, Steps, Matrix & Concurrency
Answer
Workflow env applies to all jobs, job env to all steps in that job, step env to that step; the most specific wins. Job env can use matrix, needs, vars, secrets, inputs and github. It cannot reference other keys in the same env map or steps outputs (they do not exist yet at that level).
env:
NODE_VERSION: ${{ matrix.node }}
IMAGE: ${{ vars.ECR_REGISTRY }}/shack-api
More on Jobs, Steps, Matrix & Concurrency
How does `needs` work, and what happens to a job whose dependency failed or was skipped?BeginnerWhat is the implicit `success()` in a job `if`, and why is `always()` usually the wrong fix?IntermediateWhat values can `needs.<job>.result` take?BeginnerHow does a matrix expand, and how are job names generated?BeginnerHow do `include` and `exclude` work in a matrix?IntermediateWhat do `fail-fast` and `max-parallel` do?Beginner