-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (76 loc) · 3.1 KB
/
request-initial-comments.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
80
81
82
83
84
85
86
87
88
name: "Instance Request Initial Comments"
on:
issues:
types:
- opened
workflow_dispatch:
inputs:
issue_number:
description: "Issue number"
required: true
jobs:
initial_comments:
runs-on: ubuntu-latest
steps:
- name: Collect Inputs
id: collect_inputs
run: |
echo "EVENT_NAME [$EVENT_NAME]"
if [[ "$EVENT_NAME" == "issues" ]]; then
issue_number=${{ github.event.issue.number }}
elif [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then
issue_number=${{ github.event.inputs.issue_number }}
else
echo "::error ::Unsupported EVENT_NAME [$EVENT_NAME]"
exit 1
fi
echo "issue_number=$issue_number" >> $GITHUB_OUTPUT
env:
EVENT_NAME: ${{ github.event_name }}
- uses: actions/checkout@v4
- name: Define instance name
id: define
uses: ./.github/actions/define-instance-name
with:
prefix: ${{ vars.INSTANCE_NAME_PREFIX }}
issue_number: ${{ steps.collect_inputs.outputs.issue_number }}
- name: description (instance name)
uses: julien-deramond/[email protected]
with:
issue-number: ${{ steps.collect_inputs.outputs.issue_number }}
body: |
### Instance Name
`${{ steps.define.outputs.instance_name }}`
_The instance name is derived from the GitHub issue number using the template `${{ steps.define.outputs.instance_prefix }}instance-NNN`. The instance may also be located in the exosphere interface using this name._
edit-mode: append
append-separator: newline
- name: Define volume name
id: define_volume_name
uses: ./.github/actions/define-volume-name
with:
issue_number: ${{ steps.collect_inputs.outputs.issue_number }}
suffix: ${{ vars.VOLUME_NAME_SUFFIX }}
- name: description (volume name)
uses: julien-deramond/[email protected]
with:
issue-number: ${{ steps.collect_inputs.outputs.issue_number }}
body: |
### Volume Name
`${{ steps.define_volume_name.outputs.volume_name }}`
_The volume name is derived from the GitHub issue number using the template `My-Data-NNN${{ steps.define_volume_name.outputs.volume_suffix }}`. The volume may also be located in the exosphere interface using this name._
edit-mode: append
append-separator: newline
- name: Find Issue Commands Comment
uses: peter-evans/find-comment@v3
id: fc_commands
with:
issue-number: ${{ steps.collect_inputs.outputs.issue_number }}
comment-author: "github-actions[bot]"
body-includes: "### Supported Issue Commands"
- name: comment (issue commands)
uses: peter-evans/[email protected]
with:
comment-id: ${{ steps.fc_commands.outputs.comment-id }}
issue-number: ${{ steps.collect_inputs.outputs.issue_number }}
body-path: "issue-commands.md"
edit-mode: replace