daxartio/Lock Action
Manage GitHub branch based lock mechanism
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| mode | One of the following values: - lock: Lock the key - unlock: Unlock the key - check: Check if the key is being locked | yes | — |
| key | A lock key. This is useful to manage locks by service and environment. | yes | — |
| key_prefix | A lock key prefix. This action creates and updates the branch `${keyPrefix}${key}` for each key. | no | lock- |
| github_token | GitHub Access Token. This is used to create branches and commits. The permission `contents:write` is required. | no | ${{ github.token }} |
| repo_owner | The repository owner where this action creates branches. The default value is `$GITHUB_REPOSITORY_OWNER`. | no | — |
| repo_name | The repository name where this action creates branches. The default value is the repository name of `$GITHUB_REPOSITORY`. | no | — |
| message | This is used to record the reason and context of lock and unlock operation. | no | — |
| ignore_already_locked_error | If this is `true`, the action does not fail when it can't acquire the lock as the key is already being locked. | no | false |
| unlock_wait_enabled | Indicates whether the action should wait for the lock to be released if it is already held. Set to "true" to enable waiting, or "false" to immediately fail if the lock is taken. Default is "true". | — | true |
| unlock_wait_timeout | Specifies the maximum time, in seconds, that the action should wait for the lock to be released. This is only used if unlock_wait_enabled is set to "true". Default is "10" seconds. | — | 10 |
| unlock_wait_interval | Defines the interval, in seconds, between each check to see if the lock has been released. This setting is only relevant if unlock_wait_enabled is set to "true". Default is "1" second. | — | 1 |
Outputs
| name | description |
|---|---|
| already_locked | Whether the key is already locked |
| result | The lock result |