What do `defaults.run.shell` and `defaults.run.working-directory` do, and where can they be set?
BeginnerConceptWorkflow Anatomy & Execution Model
Answer
They set the default shell and working directory for every run step, at workflow level or job level (job level wins; a step's own shell or working-directory wins over both). They do not apply to uses steps. Typical monorepo use:
jobs:
api:
defaults:
run:
working-directory: services/api
More on Workflow Anatomy & Execution Model
Define workflow, run, job, step, action and runner in one line each.BeginnerWhat is the minimum valid workflow file?BeginnerWhere must workflow files live, and does the file extension matter?BeginnerWhich version of the workflow file does GitHub use for a given run?IntermediateWhat does a GitHub-hosted runner give you at the start of a job?BeginnerShould you use `ubuntu-latest` or `ubuntu-24.04`?Beginner