-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
74 lines (69 loc) · 2.17 KB
/
action.yaml
File metadata and controls
74 lines (69 loc) · 2.17 KB
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
name: Create issue
description: Creates an issue
branding:
icon: git-pull-request
color: gray-dark
inputs:
token:
description: Your Github PAT, defaults to actions token
default: ${{ github.token }}
required: true
repo:
description: GitHub repository to create/update/close an issue in
default: ${{ github.repository }}
required: true
mode:
description: >
Dictates whether to create, update or close an issue.
Valid options: create | close
default: create
state:
description: >
State of issue to create, update or close.
Valid options: open | closed | all
default: open
title:
description: Title of issue to create or update
required: true
labels:
description: Labels (comma-separated) to both create the issue with and to filter the existing issue search with
required: false
assignees:
description: GitHub handle of the user(s) to assign the issue (comma-separated), only used for issue creation
required: false
body:
description: Body text of the issue
required: false
comment:
description: >
If set, an existing issue have this comment added to the issue.
Note, if the mode is set to create, then any previously added comment is updated instead
required: false
outputs:
url:
description: URL of the issue that was created
value: ${{ steps.action.outputs.url }}
runs:
using: composite
steps:
- name: Check dependencies are installed
shell: bash
run: |
if ! command -v gh >/dev/null 2>&1; then
echo "Command gh not found. This CLI tool is required."
exit 1
fi
- name: Create issue
id: action
shell: bash
env:
GH_TOKEN: ${{ inputs.token }}
INPUT_REPO: ${{ inputs.repo }}
INPUT_MODE: ${{ inputs.mode }}
INPUT_STATE: ${{ inputs.state }}
INPUT_TITLE: ${{ inputs.title }}
INPUT_LABELS: ${{ inputs.labels }}
INPUT_ASSIGNEES: ${{ inputs.assignees }}
INPUT_BODY: ${{ inputs.body }}
INPUT_COMMENT: ${{ inputs.comment }}
run: chmod +x "${{ github.action_path }}/src/main.sh" && "${{ github.action_path }}/src/main.sh"