-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
68 lines (63 loc) · 2.01 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
68
name: Splunk packager
description: Run splunk app packager
inputs:
app_package_path:
description: The Splunk app package path.
required: true
type: string
splunk_username:
description: The splunk username.
required: true
type: string
splunk_password:
description: The splunk password.
required: true
type: string
splunk_acs_token:
description: The splunk acs token.
required: true
type: string
splunk_acs_stack:
description: The splunk stack.
required: true
type: string
config_toml_path:
description: Path to your config.toml file.
required: true
type: string
default: config.toml
production:
description: String stating a boolean value you would like to push to production (booleans and types are not supported)
required: false
type: string
default: 'true'
runs:
using: composite
steps:
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: '3.12.3'
architecture: 'x64'
cache: 'pip'
- name: Install splunk-app-packager
shell: bash
run: pip install splunk-app-packager==0.0.4
- name: package, validate, deploy (production)
shell: bash
env:
SPLUNK_USER: ${{ inputs.splunk_username }}
SPLUNK_PASSWORD: ${{ inputs.splunk_password }}
SPLUNK_ACS_TOKEN: ${{ inputs.splunk_acs_token }}
SPLUNK_ACS_STACK: ${{ inputs.splunk_acs_stack }}
run: sap --prod ${{ inputs.app_package_path }} --config-path ${{ inputs.config_toml_path }}
if: ${{ inputs.production == 'true' }}
- name: package, validate, deploy (development)
shell: bash
env:
SPLUNK_USER: ${{ inputs.splunk_username }}
SPLUNK_PASSWORD: ${{ inputs.splunk_password }}
SPLUNK_ACS_TOKEN: ${{ inputs.splunk_acs_token }}
SPLUNK_ACS_STACK: ${{ inputs.splunk_acs_stack }}
run: sap ${{ inputs.app_package_path }} --config-path ${{ inputs.config_toml_path }}
if: ${{ inputs.production == 'false' }}