actions-marketplace-validations/branch-deploy

Enabling Branch Deployments through IssueOps with GitHub Actions

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Mar 20, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: actions-marketplace-validations/github_branch-deploy@93031d35d121a598d4d644e30b2ee1a16ad357a6 # no releases — HEAD as of 2026-07-10

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
github_tokenThe GitHub token used to create an authenticated client - Provided for you by default!yes${{ github.token }}
statusThe status of the GitHub Actions - For use in the post run workflow - Provided for you by default!yes${{ job.status }}
environmentThe name of the default environment to deploy to. Example: by default, if you type `.deploy`, it will assume "production" as the default environmentnoproduction
environment_targetsOptional (or additional) target environments to select for use with deployments. Example, "production,development,staging". Example usage: `.deploy to development`, `.deploy to production`, `.deploy to staging`noproduction,development,staging
draft_permitted_targetsOptional environments which can allow "draft" pull requests to be deployed. By default, this input option is empty and no environments allow deployments sourced from a pull request in a "draft" state. Examples: "development,staging"no""
environment_urlsOptional target environment URLs to use with deployments. This input option is a mapping of environment names to URLs and the environment names must match the "environment_targets" input option. This option is a comma separated list with pipes (|) separating the environment from the URL. Note: "disabled" is a special keyword to disable an environment url if you enable this option. Format: "<environment1>|<url1>,<environment2>|<url2>,etc" Example: "production|https://myapp.com,development|https://dev.myapp.com,staging|disabled"no""
environment_url_in_commentIf the environment_url detected in the deployment should be appended to the successful deployment comment or not. Examples: "true" or "false"notrue
production_environmentsA comma separated list of environments that should be treated as "production". GitHub defines "production" as an environment that end users or systems interact with. Example: "production,production-eu". By default, GitHub will set the "production_environment" to "true" if the environment name is "production". This option allows you to override that behavior so you can use "prod", "prd", "main", "production-eu", etc. as your production environment name. ref: https://github.com/github/branch-deploy/issues/208noproduction
reactionIf set, the specified emoji "reaction" is put on the comment to indicate that the trigger was detected. For example, "rocket" or "eyes"noeyes
triggerThe string to look for in comments as an IssueOps trigger. Example: ".deploy"no.deploy
noop_triggerThe string to look for in comments as an IssueOps noop trigger. Example: ".noop"no.noop
lock_triggerThe string to look for in comments as an IssueOps lock trigger. Used for locking branch deployments on a specific branch. Example: ".lock"no.lock
unlock_triggerThe string to look for in comments as an IssueOps unlock trigger. Used for unlocking branch deployments. Example: ".unlock"no.unlock
help_triggerThe string to look for in comments as an IssueOps help trigger. Example: ".help"no.help
lock_info_aliasAn alias or shortcut to get details about the current lock (if it exists) Example: ".info"no.wcid
permissionsThe allowed GitHub permissions an actor can have to invoke IssueOps commands - Example: "write,admin"yeswrite,admin
commit_verificationWhether or not to enforce commit verification before a deployment can continue. Default is "false"nofalse
param_separatorThe separator to use for parsing parameters in comments in deployment requests. Parameters will are saved as outputs and can be used in subsequent stepsno|
global_lock_flagThe flag to pass into the lock command to lock all environments. Example: "--global"no--global
stable_branchThe name of a stable branch to deploy to (rollbacks). Example: "main"nomain
update_branchDetermine how you want this Action to handle "out-of-date" branches. Available options: "disabled", "warn", "force". "disabled" means that the Action will not care if a branch is out-of-date. "warn" means that the Action will warn the user that a branch is out-of-date and exit without deploying. "force" means that the Action will force update the branch. Note: The "force" option is not recommended due to Actions not being able to re-run CI on commits originating from Actions itselfnowarn
outdated_modeThe mode to use for determining if a branch is up-to-date or not before allowing deployments. This option is closely related to the "update_branch" input option above. There are three available modes to choose from "pr_base", "default_branch", or "strict". The default is "strict" to help ensure that deployments are using the most up-to-date code. Please see the docs/outdated_mode.md document for more details.nostrict
required_contextsManually enforce commit status checks before a deployment can continue. Only use this option if you wish to manually override the settings you have configured for your branch protection settings for your GitHub repository. Default is "false" - Example value: "context1,context2,context3" - In most cases you will not need to touch this optionnofalse
skip_ciA comma separated list of environments that will not use passing CI as a requirement for deployment. Use this option to explicitly bypass branch protection settings for a certain environment in your repository. Default is an empty string "" - Example: "development,staging"no""
checksThis input defines how the branch-deploy Action will handle the status of CI checks on your PR/branch before deployments can continue. `"all"` requires that all CI checks must pass in order for a deployment to be triggered. `"required"` only waits for required CI checks to be passing. You can also pass in the names of your CI jobs in a comma separated list. View the documentation (docs/checks.md) for more details.noall
ignored_checksA comma separated list of checks that will be ignored when determining if a deployment can continue. This setting allows you to skip failing, pending, or incomplete checks regardless of the `checks` setting above. Example: "lint,markdown-formatting,update-pr-label". View the documentation (docs/checks.md) for more details.no""
skip_reviewsA comma separated list of environment that will not use reviews/approvals as a requirement for deployment. Use this options to explicitly bypass branch protection settings for a certain environment in your repository. Default is an empty string "" - Example: "development,staging"no""
allow_forksAllow branch deployments to run on repository forks. If you want to harden your workflows, this option can be set to false. Default is "true"notrue
adminsA comma separated list of GitHub usernames or teams that should be considered admins by this Action. Admins can deploy pull requests without the need for branch protection approvals. Example: "monalisa,octocat,my-org/my-team"nofalse
admins_patA GitHub personal access token with "read:org" scopes. This is only needed if you are using the "admins" option with a GitHub org team. For example: "my-org/my-team"nofalse
merge_deploy_modeThis is an advanced option that is an alternate workflow bundled into this Action. You can control how merge commits are handled when a PR is merged into your repository's default branch. If the merge commit SHA matches the latest deployment for the same environment, then the 'continue' output will be set to 'false' which indicates that a deployment should not be performed again as the latest deployment is identical. If the merge commit SHA does not match the latest deployment for the same environment, then the 'continue' output will be set to 'true' which indicates that a deployment should be performed. With this option, the 'environment' output is also set for subsequent steps to referencenofalse
unlock_on_merge_modeThis is an advanced option that is an alternate workflow bundled into this Action. You can optionally use this mode in a custom workflow to automatically release all locks that came from a pull request when the pull request is merged. This is useful if you want to ensure that locks are not left behind when a pull request is merged.nofalse
skip_completingIf set to "true", skip the process of completing a deployment. You must manually create a deployment status after the deployment is complete. Default is "false"nofalse
deploy_message_pathThe path to a markdown file which is used as a template for custom deployment messages. Example: ".github/deployment_message.md"no.github/deployment_message.md
sticky_locksIf set to "true", locks will not be released after a deployment run completes. This applies to both successful, and failed deployments.Sticky locks are also known as "hubot style deployment locks". They will persist until they are manually released by a user, or if you configure another workflow with the "unlock on merge" mode to remove them automatically on PR merge.nofalse
sticky_locks_for_noopIf set to "true", then sticky_locks will also be used for noop deployments. This can be useful in some cases but it often leads to locks being left behind when users test noop deployments.nofalse
allow_sha_deploymentsIf set to "true", then you can deploy a specific sha instead of a branch. Example: ".deploy 1234567890abcdef1234567890abcdef12345678 to production" - This is dangerous and potentially unsafe, view the docs to learn more: https://github.com/github/branch-deploy/blob/main/docs/sha-deployments.mdnofalse
disable_naked_commandsIf set to "true", then naked commands will be disabled. Example: ".deploy" will not trigger a deployment. Instead, you must use ".deploy to production" to trigger a deployment. This is useful if you want to prevent accidental deployments from happening. Read more about naked commands here: https://github.com/github/branch-deploy/blob/main/docs/naked-commands.mdnofalse
successful_deploy_labelsA comma separated list of labels to add to the pull request when a deployment is successful. Example: "deployed,success"no""
successful_noop_labelsA comma separated list of labels to add to the pull request when a noop deployment is successful. Example: "noop,success"no""
failed_deploy_labelsA comma separated list of labels to add to the pull request when a deployment fails. Example: "failed,deploy-failed"no""
failed_noop_labelsA comma separated list of labels to add to the pull request when a noop deployment fails. Example: "failed,noop-failed"no""
skip_successful_noop_labels_if_approvedWhether or not the post run logic should skip adding successful noop labels if the pull request is approved. This can be useful if you add a label such as "ready-for-review" after a .noop completes but want to skip adding that label in situations where the pull request is already approved.nofalse
skip_successful_deploy_labels_if_approvedWhether or not the post run logic should skip adding successful deploy labels if the pull request is approved. This can be useful if you add a label such as "ready-for-review" after a .deploy completes but want to skip adding that label in situations where the pull request is already approved.nofalse
enforced_deployment_orderA comma separated list of environments that must be deployed in a specific order. Example: `"development,staging,production"`. If this is set then you cannot deploy to latter environments unless the former ones have a successful and active deployment on the latest commit first.no""
use_security_warningsWhether or not to leave security related warnings in log messages during deployments. Default is "true"notrue
allow_non_default_target_branch_deploymentsWhether or not to allow deployments of pull requests that target a branch other than the default branch (aka stable branch) as their merge target. By default, this Action would reject the deployment of a branch named "feature-branch" if it was targeting "foo" instead of "main" (or whatever your default branch is). This option allows you to override that behavior and be able to deploy any branch in your repository regardless of the target branch. This option is potentially unsafe and should be used with caution as most default branches contain branch protection rules. Often times non-default branches do not contain these same branch protection rules. Follow along in this issue thread to learn more https://github.com/github/branch-deploy/issues/340nofalse
deployment_confirmationWhether or not to require an additional confirmation before a deployment can continue. Default is "false". If your project requires elevated security, it is highly recommended to enable this option - especially in open source projects where you might be deploying forks. docs/deployment-confirmation.mdnofalse
deployment_confirmation_timeoutThe number of seconds to wait for a deployment confirmation before timing out. Default is "60" seconds (1 minute).no60
namedescription
continueThe string "true" if the deployment should continue, otherwise empty - Use this to conditionally control if your deployment should proceed or not
triggeredThe string "true" if the trigger was found, otherwise the string "false"
comment_bodyThe comment body
issue_numberThe issue number of the pull request (or issue) that was commented on
actorThe GitHub handle of the actor that invoked the IssueOps command
environmentThe environment that has been selected for a deployment
paramsThe raw parameters that were passed into the deployment command (see param_separator)
parsed_paramsA stringified JSON object of the parsed parameters that were passed into the deployment command
noopThe string "true" if the noop trigger was found, otherwise the string "false" - Use this to conditionally control whether your deployment runs as a noop or not
shaThe sha of the branch to be deployed
default_branch_tree_shaThe sha of the default branch tree (useful for subsequent workflow steps if they need to do commit comparisons)
base_refThe base ref that the pull request is merging into
refThe ref (branch or sha) to use with deployment
comment_idThe comment id which triggered this deployment
typeThe type of trigger that was detected (examples: deploy, lock, unlock, lock-info-alias, help)
forkThe string "true" if the pull request is a fork, otherwise "false"
fork_refThe true ref of the fork
fork_labelThe API label field returned for the fork
fork_checkoutThe console command presented in the GitHub UI to checkout a given fork locally
fork_full_nameThe full name of the fork in "org/repo" format
deployment_idThe ID of the deployment created by running this action
environment_urlThe environment URL detected and used for the deployment (sourced from the environment_urls input)
initial_reaction_idThe reaction id for the initial reaction on the trigger comment
initial_comment_idThe comment id for the "Deployment Triggered 🚀" comment created by the action
actor_handleThe handle of the user who triggered the action
global_lock_claimedThe string "true" if the global lock was claimed
global_lock_releasedThe string "true" if the global lock was released
unlocked_environmentsOnly exposed when using the "unlock on merge" mode - This output variable will contain a comma separated list of the environments that were unlocked
sha_deploymentIf "allow_sha_deployments" is enabled, and a sha deployment is performed instead of a branch deployment, this output variable will contain the sha that was deployed. Otherwise, this output variable will be empty
review_decisionThe pull request review status. Can be one of a few values - examples: APPROVED, REVIEW_REQUIRED, CHANGES_REQUESTED, skip_reviews,, null
is_outdatedThe string "true" if the branch is outdated, otherwise "false"
merge_state_statusThe status of the merge state. Can be one of a few values - examples: "DIRTY", "DRAFT", "CLEAN", etc
commit_statusThe status of the commit. Can be one of a few values - examples: "SUCCESS", null, "skip_ci", "PENDING", "FAILURE" etc
approved_reviews_countThe number of approved reviews on the pull request
needs_to_be_deployedA comma separated list of environments that need successful and active deployments before the current environment (that was requested) can be deployed. This output is tied to the "enforced_deployment_order" input option.
commit_verifiedThe string "true" if the commit has a verified signature, otherwise "false"
total_secondsThe total number of seconds that the deployment took to complete (Integer)
non_default_target_branch_usedThe string "true" if the pull request is targeting a branch other than the default branch (aka stable branch) for the merge, otherwise unset