Skip to content

Commit 03405cf

Browse files
committed
Update to include optional parameters
1 parent 4dd3784 commit 03405cf

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

.github/actions/appinspect_publish/publish.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
SPLUNK_USERNAME = os.environ['INPUT_SPLUNK_USERNAME']
99
SPLUNK_PASSWORD = os.environ['INPUT_SPLUNK_PASSWORD']
1010
SPLUNK_VERSION = os.environ['INPUT_SPLUNK_VERSION']
11+
VISIBILITY = os.environ['INPUT_VISIBILITY']
12+
CIM_VERSIONS = os.environ['INPUT_CIM_VERSIONS']
1113

1214
api_path = 'https://splunkbase.splunk.com/api/v1/app/{}/new_release'.format(APP_ID)
1315

@@ -16,9 +18,9 @@
1618
files = {
1719
'files[]': open(filepath, 'rb'),
1820
'filename': (None, os.path.basename(filepath)),
19-
'splunk_version': (None, SPLUNK_VERSION),
20-
'visibility': (None, 'false'),
21-
'cim_versions': (None, '')
21+
'splunk_versions': (None, SPLUNK_VERSION),
22+
'visibility': (None, VISIBILITY),
23+
'cim_versions': (None, CIM_VERSIONS)
2224
}
2325

2426
response = requests.post(api_path, files=files, auth=auth)

.github/workflows/appinspect_api.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,11 @@ jobs:
5151
env:
5252
GHR_PATH: ./dist/github_app_for_splunk.spl
5353
GITHUB_TOKEN: ${{ secrets.API_TOKEN }}
54+
- name: Hello world action step
55+
uses: ./.github/actions/appinspect_publish # Uses an action in the root directory
56+
with:
57+
APP_ID: '5596'
58+
APP_FILE: 'github_app_for_splunk.spl'
59+
SPLUNK_USERNAME: ${{ secrets.SPLUNKBASE_USER }}
60+
SPLUNK_PASSWORD: ${{ secrets.SPLUNKBASE_PASSWORD }}
61+
SPLUNK_VERSION: '8.0,8.1'

.github/workflows/appinspect_cli.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,4 @@ jobs:
6363
name: github_app_for_splunk-1.0.0.tar.gz
6464
path: ./github_app_for_splunk-1.0.0.tar.gz
6565

66-
- name: Hello world action step
67-
uses: ./.github/actions/appinspect_publish # Uses an action in the root directory
68-
id: hello
69-
with:
70-
APP_ID: '5596'
71-
APP_FILE: 'github_app_for_splunk-1.0.0.tar.gz'
72-
SPLUNK_USERNAME: ${{ secrets.SPLUNKBASE_USER }}
73-
SPLUNK_PASSWORD: ${{ secrets.SPLUNKBASE_PASSWORD }}
74-
SPLUNK_VERSION: '8.0,8.1'
66+

0 commit comments

Comments
 (0)