ecurity features  ](/en/actions/security-guides/using-githubs-security-features-to-secure-your-use-of-github-actions)
    * [ Automatic token authentication  ](/en/actions/security-guides/automatic-token-authentication)

  * Creating actions 

    * [ About custom actions  ](/en/actions/creating-actions/about-custom-actions)
    * [ Create a Docker container action  ](/en/actions/creating-actions/creating-a-docker-container-action)
    * [ Create a JavaScript action  ](/en/actions/creating-actions/creating-a-javascript-action)
    * [ Create a composite action  ](/en/actions/creating-actions/creating-a-composite-action)
    * [ Metadata syntax  ](/en/actions/creating-actions/metadata-syntax-for-github-actions)
    * [ Dockerfile support  ](/en/actions/creating-actions/dockerfile-support-for-github-actions)
    * [ Set exit codes  ](/en/actions/creating-actions/setting-exit-codes-for-actions)
    * [ Publish in GitHub Marketplace  ](/en/actions/creating-actions/publishing-actions-in-github-marketplace)
    * [ Share from your private repository  ](/en/actions/creating-actions/sharing-actions-and-workflows-from-your-private-repository)
    * [ Share with your organization  ](/en/actions/creating-actions/sharing-actions-and-workflows-with-your-organization)
    * [ Release and maintain actions  ](/en/actions/creating-actions/releasing-and-maintaining-actions)
    * [ CLI setup action  ](/en/actions/creating-actions/developing-a-third-party-cli-action)

  * [ Guides for GitHub Actions  ](/en/actions/guides)

  * [ GitHub Actions ](/en/actions "GitHub Actions") / 
  * [ Using jobs ](/en/actions/using-jobs "Using jobs") / 
  * [ Set default values for jobs ](/en/actions/using-jobs/setting-default-values-for-jobs "Set default values for jobs")

#  Setting default values for jobs

Define the default settings that will apply to all jobs in the workflow, or
all steps in a job.

##  In this article

  * Overview 
  * Setting default shell and working directory 
  * Setting default values for a specific job 
  * Setting default shell and working directory for a job 

##  Overview

Use ` defaults ` to create a ` map ` of default settings that will apply to
all jobs in the workflow. You can also set default settings that are only
available to a job. For more information, see [ ` jobs.<job_id>.defaults `
](/en/actions/using-workflows/workflow-syntax-for-github-
actions#jobsjob_iddefaults) .

When more than one default setting is defined with the same name, GitHub uses
the most specific default setting. For example, a default setting defined in a
job will override a default setting that has the same name defined in a
workflow.

##  Setting default shell and working directory

You can use ` defaults.run ` to provide default ` shell ` and ` working-
directory ` options for all [ ` run ` ](/en/actions/using-workflows/workflow-
syntax-for-github-actions#jobsjob_idstepsrun) steps in a workflow. You can
also set default settings for ` run ` that are only available to a job. For
more information, see [ ` jobs.<job_id>.defaults.run ` ](/en/actions/using-
workflows/workflow-syntax-for-github-actions#jobsjob_iddefaultsrun) . You
cannot use contexts or expressions in this keyword.

When more than one default setting is defined with the same name, GitHub uses
the most specific default setting. For example, a default setting defined in a
job will override a default setting that has the same name defined in a
workflow.

####  Example: Set the default shell and working directory

    
    
    defaults:
      run:
        shell: bash
        working-directory: ./scripts
    

##  Setting default values for a specific job

Use ` jobs.<job_id>.defaults ` to create a ` map ` of default settings that
will apply to all steps in the job. You can also set default settings for the
entire workflow. For more information, see [ ` defaults ` ](/en/actions/using-
workflows/workflow-syntax-for-github-actions#defaults) .

When more than one default setting is defined with