-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (53 loc) · 1.74 KB
/
control-instance-from-workflow.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
name: Control Instance from Workflow
on:
workflow_dispatch:
inputs:
issue_number:
description: "Issue number"
required: true
type: number
command_name:
description:
"Name of the command to execute: create, delete, shelve, unshelve"
required: true
type: string
workflow_call:
inputs:
issue_number:
description: "Issue number"
required: true
type: number
command_name:
description:
"Name of the command to execute: create, delete, shelve, unshelve"
required: true
type: string
permissions:
issues: write
checks: read
jobs:
control:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Control instance
run: |
gh issue comment $ISSUE_NUMBER \
-b "Command <tt>shelve</tt> issued by **control-instance-from-workflow.yml** workflow<br> \
<br> \
For details, see https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}_"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
ISSUE_NUMBER: ${{ inputs.issue_number }}
- name: Control instance
uses: ./.github/actions/control-instance
with:
os_cloud: ${{ vars.MORPHOCLOUD_OS_CLOUD }}
issue_number: ${{ inputs.issue_number }}
command_name: ${{ inputs.command_name }}
instance_name_prefix: ${{ vars.INSTANCE_NAME_PREFIX }}
token: ${{ secrets.GITHUB_TOKEN }}
string_encryption_key: ${{ secrets.STRING_ENCRYPTION_KEY }}
mail_server_username: ${{secrets.MAIL_USERNAME}}
mail_server_password: ${{secrets.MAIL_PASSWORD}}