-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
79 lines (78 loc) · 2.48 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Lock Action
description: Manage GitHub branch based lock mechanism
author: Danil Akhtarov
branding:
icon: lock
color: green
inputs:
# Required
mode:
description: |
One of the following values:
- lock: Lock the key
- unlock: Unlock the key
- check: Check if the key is being locked
required: true
key:
description: |
A lock key. This is useful to manage locks by service and environment.
required: true
# Optional
key_prefix:
description: |
A lock key prefix.
This action creates and updates the branch `${keyPrefix}${key}` for each key.
required: false
default: 'lock-'
github_token:
description: |
GitHub Access Token.
This is used to create branches and commits.
The permission `contents:write` is required.
required: false
default: ${{ github.token }}
repo_owner:
description: |
The repository owner where this action creates branches.
The default value is `$GITHUB_REPOSITORY_OWNER`.
required: false
repo_name:
description: |
The repository name where this action creates branches.
The default value is the repository name of `$GITHUB_REPOSITORY`.
required: false
message:
description: |
This is used to record the reason and context of lock and unlock operation.
required: false
ignore_already_locked_error:
description: |
If this is `true`, the action does not fail when it can't acquire the lock as the key is already being locked.
default: 'false'
required: false
unlock_wait_enabled:
description:
'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".'
default: 'true'
unlock_wait_timeout:
description:
'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.'
default: '10'
unlock_wait_interval:
description:
'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.'
default: '1'
outputs:
already_locked:
description: Whether the key is already locked
result:
description: The lock result
runs:
using: 'node20'
main: 'dist/index.js'