ghtier
← All permissions
Repository permission·deployments:write

Deployments: Write

Tier 2 · Medium

Why Tier 2

Creates and deletes deployments for any branch, tag or commit, sets their statuses, and approves or rejects pending jobs where the caller is a required reviewer or the custom protection rule. A deployment triggers workflows on the deployment event at the commit it names, and a success status can satisfy a rule that requires deployments to succeed before merging. A deployment branch policy on the environment limits which refs can deploy.

Can reach T1 when an environment with production secrets has no deployment branch policy and a workflow on the deployment event deploys to it, or the caller is a required reviewer or the custom protection rule for it, so its approval releases them.

Inferred from: GitHub Docs: deployments, GitHub Docs: events that trigger workflows, GitHub Docs: deployments and environments

Target
Repository
Plane
DataWorkflows: Workflow files and runs, variables, deployments, environments and Pages.
Granted by
Fine-grained PAT, GitHub App, GITHUB_TOKEN
Available on
Every setup
In a workflow
permissions: deployments: writeWorkflow scopes by tier

What it unlocks

5 REST endpoints need this permission, from GitHub's docs data. Some also need another permission, and a few work with only one kind of token.

  • POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_ruleinstallation access tokens only
  • POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments
  • POST /repos/{owner}/{repo}/deployments
  • DELETE /repos/{owner}/{repo}/deployments/{deployment_id}
  • POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses

Roles that include it

No built-in role includes it. Only tokens, Apps or custom roles can grant it.

Classic scopes that reach it

Attack paths

Other levels

GitHub Docs: Repository permissions for "Deployments"