This repository was archived by the owner on Apr 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
85 lines (75 loc) · 2.88 KB
/
action.yml
File metadata and controls
85 lines (75 loc) · 2.88 KB
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
78
79
80
81
82
83
84
85
name: Deploy Setup Action
description: Download direct tools
inputs:
solsta_client_id:
description: Client ID to authenticate usage of Solid State Networks console tools
required: true
default: ""
solsta_client_secret:
description: Secret Key to authenticate usage of Solid State Networks console tools
required: true
default: ""
console_version:
description: Version of Solsta Console Tools to use
required: true
default: "7.2.49"
scripts_version:
description: Version of Solsta Deploy Scripts to use
required: true
default: "3.11.0"
outputs:
result:
description: The state of the action, if processes completed successfully
runs:
using: composite
steps:
- name: Create work directory
shell: bash
run: |
rm -f *.py
rm -f deploy-scripts-${{ inputs.scripts_version }}.zip
mkdir -p solsta_work
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Download deploy scripts
shell: bash
run: |
pip install wget
python -m wget -o deploy-scripts-${{ inputs.scripts_version }}.zip https://releases.snxd.com/deploy-scripts-${{ inputs.scripts_version }}.zip
echo -e "import zipfile\nzip = zipfile.ZipFile('deploy-scripts-${{ inputs.scripts_version }}.zip')\nzip.extractall()\n" > unzip.py
python unzip.py
working-directory: solsta_work
- name: Install dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install python prerequisites
shell: bash
run: python -m pip install -r requirements.txt
working-directory: solsta_work
- name: Write console.json
shell: bash
run: |
# Generate console credential file from env vars
echo "{\"consoleCredentials\":{\"audience\":\"https://axis.snxd.com/\",\"clientId\":\"${{ inputs.solsta_client_id }}\",\"clientSecret\":\"${{ inputs.solsta_client_secret }}\",\"grant\":\"clientCredentials\"}}" > client_credentials.json
working-directory: solsta_work
- name: Cache console tools
uses: actions/cache@v5
with:
path: solsta_work/solsta_console/${{ inputs.console_version }}
key: direct-${{ inputs.console_version }}
restore-keys: direct-${{ inputs.console_version }}
- name: Download Console Tools
shell: bash
working-directory: solsta_work
run: |
# Download the latest SSN Console Tools if necessary
if [ ! -d "solsta_console/${{ inputs.console_version }}" ]; then
python direct_get.py --overwrite --version="${{ inputs.console_version }}" --target_directory=solsta_console/${{ inputs.console_version }}/ --console_credentials=client_credentials.json --component=console
fi
branding:
icon: "download-cloud"
color: "yellow"