Skip to content

(PIE-1493) Splunk AppInspect update #18

(PIE-1493) Splunk AppInspect update

(PIE-1493) Splunk AppInspect update #18

Workflow file for this run

name: Validate Splunk App
on:
pull_request:
branches:
- main
jobs:
appinspect:
runs-on: ubuntu-latest
container: ghcr.io/coreymbe/splunk-appinspect:v3
steps:
- uses: actions/checkout@v4
- name: Set App Name
id: repo-name
run: |
repo_name=$(basename ${{ github.repository }})
echo "splunk_app=$repo_name" >> $GITHUB_OUTPUT
- name: Run AppInspect
run: splunk-appinspect inspect ${{ steps.repo-name.outputs.splunk_app }} --output-file appinspect_result.json --mode precert --included-tags cloud
- name: Check AppInspect Errors
id: appinspect-errors
run: |
error_check=$(jq '.summary.error' appinspect_result.json)
echo "error_count=$error_check" >> $GITHUB_OUTPUT
- name: Check AppInspect Failures
id: appinspect-failures
run: |
fail_check=$(jq '.summary.failure' appinspect_result.json)
echo "fail_count=$fail_check" >> $GITHUB_OUTPUT
- name: AppInspect Errors
if: ${{ steps.appinspect-errors.outputs.error_count > 0 }}
uses: actions/github-script@v7
with:
script: core.setFailed('AppInspect contains errors!')
- name: AppInspect Failures
if: ${{ steps.appinspect-failures.outputs.fail_count > 0 }}
uses: actions/github-script@v7
with:
script: core.setFailed('AppInspect contains failures!')
- name: Upload AppInspect Results
uses: actions/upload-artifact@v4
with:
name: AppInspect_${{ steps.repo-name.outputs.splunk_app }}
path: appinspect_result.json