-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
63 lines (56 loc) · 1.55 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
name: 'Cloud Deploy Action'
description: 'Cloud Deploy Action'
inputs:
CLIENT_ID:
description: Account client id
required: true
CLIENT_KEY:
description: Account client secret key
required: true
CLIENT_REALM:
description: Account client realm
required: true
VERBOSE:
description: Verbose configuration
required: false
APPLICATION_FILE:
description: Application file path to use
required: true
IMAGE_TAG:
description: Image tag to use
required: true
runs:
using: "composite"
steps:
- name: Check Runner
run: echo 🤖 OS runner is $(uname)
shell: bash
- name: Setup Python
uses: actions/setup-python@v5.2.0
with:
python-version: '3.12'
- name: Install python libraries
run: pip install requests ruamel-yaml==0.18.6
shell: bash
- name: Start StackSpot Cloud Deploy
id: deployment
env:
CLIENT_ID: ${{ inputs.CLIENT_ID }}
CLIENT_KEY: ${{ inputs.CLIENT_KEY }}
CLIENT_REALM: ${{ inputs.CLIENT_REALM }}
VERBOSE: ${{ inputs.VERBOSE }}
APPLICATION_FILE: ${{ inputs.APPLICATION_FILE }}
IMAGE_TAG: ${{ inputs.IMAGE_TAG }}
run: |
if [ ${{runner.os}} != 'Windows' ]; then
python3 ${{ github.action_path }}/deployment.py
elif [ ${{runner.os}} == 'Windows' ]; then
python ${{ github.action_path }}\deployment.py
else
echo "${{runner.os}} not supported"
exit 1
fi
shell: bash
branding:
icon: 'terminal'
color: 'gray-dark'