-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
67 lines (64 loc) · 2.43 KB
/
action.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
name: Viam module upload
description: Upload a module to the Viam registry
inputs:
meta-path:
description: location of module metadata. set to empty string to not use
default: meta.json
module-path:
description: location of the bundled module
default: module.tar.gz
name:
description: name of the module. only necessary if you don't provide a metadata file. (see inputs.meta-path)
org-id:
description: organization id. one of org-id or namespace are required if you don't provide a metadata file. (see inputs.meta-path)
namespace:
description: public namespace. one of org-id or namespace are required if you don't provide a metadata file. (see inputs.meta-path)
key-id:
description: ID of your auth key
required: true
key-value:
description: secret value of your auth key
required: true
platform:
description: a string like 'linux/amd64'. run `viam module upload --help` for all options.
tags:
description: optional. comma-separated list of tags for precise platform targeting. run `viam module upload --help` for all options.
version:
description: version to set for the module. required if do-upload=true
do-update:
description: run step 1, updating the metadata. requires metadata at inputs.meta-path.
type: boolean
default: true
do-upload:
description: run step 2, uploading the module
type: boolean
default: true
runs:
using: docker
image: Dockerfile
args:
# list of key, value for optional args
- ${{ inputs.meta-path && '--meta-path' || '' }}
- ${{ inputs.meta-path || '' }}
- ${{ inputs.module-path && '--module-path' || '' }}
- ${{ inputs.module-path || '' }}
- ${{ inputs.name && '--name' || '' }}
- ${{ inputs.name || '' }}
- ${{ inputs.org-id && '--org-id' || '' }}
- ${{ inputs.org-id || '' }}
- ${{ inputs.namespace && '--namespace' || '' }}
- ${{ inputs.namespace || '' }}
- ${{ inputs.cli-config-secret && '--cli-config-secret' || '' }}
- ${{ inputs.cli-config-secret || '' }}
- ${{ inputs.platform && '--platform' || '' }}
- ${{ inputs.platform || '' }}
- ${{ inputs.tags && '--tags' || '' }}
- ${{ inputs.tags || '' }}
- ${{ inputs.version && '--version' || '' }}
- ${{ inputs.version || '' }}
- ${{ fromJSON(inputs.do-update) && '--do-update' || '' }}
- ${{ fromJSON(inputs.do-upload) && '--do-upload' || '' }}
- --key-id=${{ inputs.key-id }}
- --key-value=${{ inputs.key-value }}
branding:
icon: upload-cloud