forked from ben-z/gh-action-mutex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
44 lines (43 loc) · 1.34 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
# action.yml
name: 'Mutex Action'
branding:
icon: 'lock'
color: 'black'
description: 'A simple locking/unlocking mechanism to provide mutual exclusion in Github Actions'
inputs:
repo-token:
description: 'The token for accessing the repo.'
required: false
default: ${{ github.token }}
github_server:
description: 'The GitHub server URL without `https`. This might be useful for e.g. GHES'
required: false
default: github.com
repository:
description: 'The repository path that stores the lock. E.g `ben-z/gh-action-mutex`'
required: false
default: ${{ github.repository }}
branch:
description: 'The branch to use for the mutex'
required: false
default: 'gh-mutex'
debug:
description: 'Print debug output'
required: false
default: "false"
internal_checkout-location:
description: '[Internal] The location to store the mutex repo'
required: false
default: '/run/gh-action-mutex/repo'
runs:
using: 'docker'
image: 'Dockerfile'
env:
ARG_BRANCH: ${{ inputs.branch }}
ARG_CHECKOUT_LOCATION: ${{ inputs.internal_checkout-location }}
ARG_GITHUB_SERVER: ${{ inputs.github_server }}
ARG_REPOSITORY: ${{ inputs.repository }}
ARG_REPO_TOKEN: ${{ inputs.repo-token }}
ARG_DEBUG: ${{ inputs.debug }}
entrypoint: '/scripts/lock.sh'
post-entrypoint: '/scripts/unlock.sh'