-
Notifications
You must be signed in to change notification settings - Fork 28
61 lines (59 loc) · 2.29 KB
/
appinspect_api.yml
File metadata and controls
61 lines (59 loc) · 2.29 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
name: App Inspect API
on:
push:
tags:
- 'v*.*.*'
jobs:
appinspect:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
- uses: actions/cache@v1
with:
path: node_modules
key: nodeModules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
nodeModules-
- name: Update Version Number
run: |
old_str="X.Y.Z"
new_str=$(echo "${GITHUB_REF#refs/*/}" | tr -d "v")
sed -i "s/$old_str/$new_str/g" package.json
sed -i "s/$old_str/$new_str/g" ./github_app_for_splunk/default/app.conf
cat package.json
cat ./github_app_for_splunk/default/app.conf
- name: Install dependencies
run: yarn install
env:
CI: true
- name: Build app package
run: |
yarn package
mv dist/*.spl dist/github_app_for_splunk.spl
- uses: actions/upload-artifact@v1
with:
name: app-package
path: dist/github_app_for_splunk.spl
- uses: ./.github/actions/appinspect_api
with:
filePath: ./dist/github_app_for_splunk.spl
splunkUser: ${{ secrets.SPLUNKBASE_USER }}
splunkPassword: ${{ secrets.SPLUNKBASE_PASSWORD }}
includedTags: cloud
- name: Release
uses: fnkr/github-action-ghr@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GHR_PATH: ./dist/github_app_for_splunk.spl
GITHUB_TOKEN: ${{ secrets.API_TOKEN }}
- name: Publish App to Splunkbase
uses: ./.github/actions/appinspect_publish # Uses an action in the root directory
with:
APP_ID: '5596'
APP_FILE: './dist/github_app_for_splunk.spl'
SPLUNK_USERNAME: ${{ secrets.SPLUNKBASE_USER }}
SPLUNK_PASSWORD: ${{ secrets.SPLUNKBASE_PASSWORD }}
SPLUNK_VERSION: '8.0,8.1,8.2,9.0'