-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
77 lines (74 loc) · 2.51 KB
/
action.yaml
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
name: 'acid'
description: 'Azure Container Instances Deployer.'
inputs:
action:
description: 'deploy/delete'
required: true
subscription:
description: 'Existing Azure subscription name or id.'
required: true
rg:
description: 'Existing Azure resource group name.'
required: true
file:
description: 'Container group yaml file. Overrides all optional arguments.'
location:
description: 'Azure region.'
aci:
description: 'Name of the Azure Container Instances to create.'
image:
description: 'Existing Docker image reference (fqdn/repository:tag).'
vnet:
description: 'Existing Azure virtual network name or id.'
subnet:
description: 'Existing Azure subnet name or id.'
env_variables:
description: 'Environment variables for container. Space-separated list.'
env_secrets:
description: 'Secret variables for container. Space-separated list.'
cpus:
description: 'The required number of CPU cores of the container.'
memory_gbs:
description: 'The required memory of the container in GB.'
restart_policy:
description: 'Container restart policy: Always, Never, OnFailure.'
law:
description: 'Existing Log Analytics workspace name or id.'
law_key:
description: 'The Log Analytics workspace key.'
command:
description: 'Command to run. String. Overrides entrypoint and cmd.'
az_args:
description: 'Azure CLI arguments, possibly overriding previous arguments.'
runs:
using: 'composite'
steps:
- name: Set GitHub Path
run: echo "$GITHUB_ACTION_PATH" >> $GITHUB_PATH
shell: bash
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}
- name: Run acid
run: acid ${{ inputs.az_args }}
shell: bash
env:
INPUT_ACTION: ${{ inputs.action }}
INPUT_SUBSCRIPTION: ${{ inputs.subscription }}
INPUT_RG: ${{ inputs.rg }}
INPUT_FILE: ${{ inputs.file }}
INPUT_LOCATION: ${{ inputs.location }}
INPUT_ACI: ${{ inputs.aci }}
INPUT_IMAGE: ${{ inputs.image }}
INPUT_VNET: ${{ inputs.vnet }}
INPUT_SUBNET: ${{ inputs.subnet }}
INPUT_ENV_VARIABLES: ${{ inputs.env_variables }}
INPUT_ENV_SECRETS: ${{ inputs.env_secrets }}
INPUT_CPUS: ${{ inputs.cpus }}
INPUT_MEMORY_GBS: ${{ inputs.memory_gbs }}
INPUT_RESTART_POLICY: ${{ inputs.restart_policy }}
INPUT_LAW: ${{ inputs.law }}
INPUT_LAW_KEY: ${{ inputs.law_key }}
INPUT_COMMAND: ${{ inputs.command }}
branding:
icon: 'cloud'
color: 'yellow'