-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
44 lines (42 loc) · 1.58 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
name: "runx"
description: "Magical Infrastructure and Deploys"
inputs:
image:
description: "The local image being deployed, provided in the form <IMAGE_NAME>:<IMAGE_TAG>"
required: false
env:
description: "The name of your environment as defined in your runx config files"
required: true
tag:
description: 'The tag associated with this image. Defaults to the tag on the "image" input field'
required: false
apply:
description: 'Set this to some value if you wish to do opta apply instead of opta deploy (i.e. for environment yamls or if you are handling docker push outside of opta).'
required: false
config:
description: 'The location of the opta config file. Defaults to "opta.yml" in the root dir'
required: false
default: "opta.yml"
version:
description: "The version of opta that you are using"
required: true
runs:
using: "composite"
steps:
- name: Update deployment
shell: bash
run: |
VERSION=$VERSION /bin/bash -c "$(curl -fsSL https://docs.opta.dev/install.sh)"
if [ -z "$APPLY" ]; then
~/.opta/opta apply --env $OPTA_ENV --config $CONFIG --auto-approve
elif [ -z "$TAG" ]; then
~/.opta/opta deploy --image $IMAGE --env $OPTA_ENV --config $CONFIG --auto-approve
else
~/.opta/opta deploy --image $IMAGE --env $OPTA_ENV --config $CONFIG --tag $TAG --auto-approve
fi
env:
OPTA_ENV: ${{ inputs.env }}
IMAGE: ${{ inputs.image }}
APPLY: ${{ inputs.apply }}
CONFIG: ${{ inputs.config }}
VERSION: ${{ inputs.version }}