github/deploy-lock
Lock Action to support deployment locking for the branch-deploy Action
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Nov 26, 2025
- License
- MIT
Pinned Snippet
uses: github/lock@9a5898804aedcdfb43592ed16b6457768d048183 # v3.0.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| github_token | The GitHub token used to create an authenticated client - Provided for you by default! | yes | ${{ github.token }} |
| environment | The explict environment to apply locking actions to when running in headless mode - OR the default environment to use when running in the context of IssueOps commands in a comment - Examples: production, development, etc - Use "global" for the global lock environment | yes | production |
| environment_targets | Optional (or additional) target environments to select for use with lock/unlock. Example, "production,development,staging". Example usage: `.lock development`, `.lock production`, `.unlock staging` | no | production,development,staging |
| lock_trigger | The 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_trigger | The string to look for in comments as an IssueOps unlock trigger. Used for unlocking branch deployments. Example: "unlock" | no | .unlock |
| reaction | If set, the specified emoji "reaction" is put on the comment to indicate that the trigger was detected. For example, "rocket" or "eyes" | no | eyes |
| lock_info_alias | An alias or shortcut to get details about the current lock (if it exists) Example: ".info" | no | .wcid |
| global_lock_flag | The flag to pass into the lock command to lock all environments. Example: "--global" | no | --global |
| prefix_only | If "false", the trigger can match anywhere in the comment | no | true |
| mode | The mode to use "lock", "unlock", or "check". If not provided, the default mode assumes the workflow is not headless and triggered by a comment on a pull request - Example: .lock / .unlock | no | — |
| reason | Reason for claiming the deployment lock for this repository | no | — |
Outputs
| name | description |
|---|---|
| triggered | The string "true" if the trigger was found, otherwise the string "false" |
| comment_id | The comment id which triggered this deployment (if it was not headless) |
| type | The type of trigger which was found - 'lock', 'unlock', or 'info-info-alias' |
| comment_body | The comment body which triggered this action (if it was not headless) |
| headless | The string "true" if the run was headless, otherwise the string "false" - Headless in this context would be if the "mode" was set and the Action was not invoked by a comment on a pull request |
| locked | If the mode is set to "check", this output will be "true" if a lock exists, otherwise "false" |
| lock_environment | When running in headless mode and the "mode" is set to "check", this output will be the environment name that holds the lock, otherwise it will be empty |
| branch | If the mode is set to "check", this output will be the branch name that holds the lock, otherwise it will be empty |
| created_by | If the mode is set to "check", this output will be the user that holds the lock, otherwise it will be empty |
| created_at | If the mode is set to "check", this output will be the ISO 8601 format date that the lock was claimed, otherwise it will be empty |
| reason | If the mode is set to "check", this output will be the reason the deployment lock was claimed, otherwise it will be empty |
| link | If the mode is set to "check", this output will be the link to the GitHub issue comment or action run that claimed the lock, otherwise it will be empty |
| global_lock_claimed | The string "true" if the global lock was claimed |
| global_lock_released | The string "true" if the global lock was released |