Skip to content

Commit cfc0695

Browse files
committed
Add Auth
1 parent 4ed0b39 commit cfc0695

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.github/actions/appinspect_publish/action.yml

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ inputs:
99
description: 'App ID From Splunkbase'
1010
required: true
1111
default: '5596'
12+
splunkUser:
13+
description: 'Splunkbase Username'
14+
required: true
15+
splunkPassword:
16+
description: 'Splunkbase Password'
17+
required: true
1218
outputs:
1319
time: # id of output
1420
description: 'The time we greeted you'

.github/actions/appinspect_publish/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,16 @@ try {
1313
//console.log(`The event payload: ${payload}`);
1414

1515
const AppID = core.getInput('AppID');
16+
const user = core.getInput('User');
17+
const password = core.getInput('Password');
18+
1619
// Print the response body to the console
1720
const options = {
1821
hostname: 'splunkbase.splunk.com',
1922
port: 443,
2023
path: `/api/v1/app/${AppID}/new_release/`,
2124
method: 'POST',
25+
auth : `${user}:${password}`,
2226
headers: {
2327
'Content-Type': 'application/json'
2428
},

.github/workflows/testWorkflow.yml

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
with:
1616
who-to-greet: 'Mona the Octocat'
1717
AppID: '5596'
18+
splunkUser: ${{ secrets.SPLUNKBASE_USER }}
19+
splunkPassword: ${{ secrets.SPLUNKBASE_PASSWORD }}
1820
# Use the output from the `hello` step
1921
- name: Get the output time
2022
run: echo "The time was ${{ steps.hello.outputs.time }}"

0 commit comments

Comments
 (0)