Skip to content

Commit 5ba1402

Browse files
committed
update readme
1 parent efc2f4d commit 5ba1402

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This section goes into detail on how you can use this Action in your own workflo
3838

3939
### About the `mode` Input
4040

41-
If you wish to use this Action via a comment on a pull request, simply omit the `mode` input. If you wish to use this Action via a workflow dispatch event, conditially in a custom workflow, or otherwise, you must provide the `mode` input. You are telling the Action what "mode" to use. The `mode` input can be either `lock` or `unlock`.
41+
If you wish to use this Action via a comment on a pull request, simply omit the `mode` input. If you wish to use this Action via a workflow dispatch event, conditially in a custom workflow, or otherwise, you must provide the `mode` input. You are telling the Action what "mode" to use. The `mode` input can be either `lock`, `unlock`, or `check`.
4242

4343
## Outputs 📤
4444

@@ -85,14 +85,22 @@ jobs:
8585
### Setting a Lock via a Workflow Dispatch Event
8686
8787
```yaml
88-
name: lock
88+
name: lock-dispatch
8989

9090
on:
9191
workflow_dispatch:
9292
inputs:
9393
reason:
94-
description: 'Reason for claiming the deployment lock for this repository'
94+
description: 'Reason for claiming the deployment lock'
9595
required: false
96+
environment:
97+
description: 'The environment to claim a lock for (production, staging, etc) - global is supported to claim the special global lock)'
98+
required: true
99+
default: 'production'
100+
mode:
101+
description: 'The mode to use: check, lock, unlock'
102+
required: true
103+
default: 'lock'
96104

97105
permissions:
98106
contents: write
@@ -101,12 +109,12 @@ jobs:
101109
lock:
102110
runs-on: ubuntu-latest
103111
steps:
104-
# Lock
105112
- uses: github/[email protected]
106113
id: lock
107114
with:
108-
mode: "lock"
115+
mode: ${{ github.event.inputs.mode }}
109116
reason: ${{ github.event.inputs.reason }}
117+
environment: ${{ github.event.inputs.environment }}
110118
```
111119
112120
### Removing a Lock via a Workflow Dispatch Event

0 commit comments

Comments
 (0)