forked from Opentrons/opentrons-emulation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
68 lines (59 loc) · 1.93 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
name: Opentrons Emulation
description: Run commands from opentrons-emulation repo
author: Derek Maggio
inputs:
input-file:
description: 'YAML or JSON system configuration'
required: true
substitutions:
description: |
List of lists containing substitutions you want to make to the file.
In the format of [[service_name, property_to_replace, replacement_value], ...]
required: false
output-file-location:
description: Location of output file
required: false
command:
description: 'Command to run'
required: true
cache-break:
description: Break the Cache
required: false
default: default
runs:
using: "composite"
steps:
- name: Validate Command
if: ${{ !contains(fromJson('["setup", "setup-python-only", "run", "teardown", "yaml-sub"]'), inputs.command)}}
run: |
echo "${{ inputs.command }} is not a command supported in the action.yaml file of opentrons-emulation"
exit 1
shell: bash
- name: Run Command
if: inputs.command == 'run'
uses: ./.github/actions/run
with:
input-file: ${{ inputs.input-file }}
- name: Setup Command
if: inputs.command == 'setup'
uses: ./.github/actions/setup
with:
input-file: ${{ inputs.input-file }}
cache-break: ${{ inputs.cache-break }}
- name: Setup Command (Python Only)
if: inputs.command == 'setup-python-only'
uses: ./.github/actions/setup-python-only
with:
cache-break: ${{ inputs.cache-break }}
- name: Teardown Command
if: inputs.command == 'teardown'
uses: ./.github/actions/teardown
with:
input-file: ${{ inputs.input-file }}
- name: YAML Sub
if: inputs.command == 'yaml-sub'
uses: ./.github/actions/yaml-sub
with:
input-file: ${{ inputs.input-file }}
output-file-location: ${{ inputs.output-file-location }}
substitutions: ${{ inputs.substitutions }}