-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
38 lines (32 loc) · 1.16 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
name: 'Recognize CLI action'
description: 'Execute Recognize CLI commands.'
inputs:
command:
description: Command to execute
default: policies validate
required: true
version:
description: Version to use
default: v1.0.0
required: true
application-insights-key:
description: Key to use for communication with application insights
required: true
runs:
using: "composite"
steps:
- shell: sh
env:
RECOGNIZE_CLI_APPLICATION_INSIGHTS_KEY: ${{ inputs.application-insights-key }}
RECOGNIZE_CLI_VERSION: ${{ inputs.version }}
COMMAND: ${{ inputs.command }}
run: |
set -e
COMMAND=${COMMAND:?'COMMAND environment variable missing.'}
RECOGNIZE_CLI_VERSION=${RECOGNIZE_CLI_VERSION:?'RECOGNIZE_CLI_VERSION environment variable missing.'}
echo "Downloading latest version of the CLI tool..."
curl -sfS -o recognize-cli https://strecognizeclireleaseprd.blob.core.windows.net/downloads/$RECOGNIZE_CLI_VERSION/recognize_cli_linux_386
chmod +x recognize-cli
mv recognize-cli /usr/local/bin
recognize-cli $COMMAND
rm /usr/local/bin/recognize-cli