Skip to content

Update workflow to use artifact actions v4 #16

Update workflow to use artifact actions v4

Update workflow to use artifact actions v4 #16

Workflow file for this run

name: Run InSpec Profile
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
my-job:
name: Validate my profile
runs-on: windows-2022
env:
CHEF_LICENSE: accept-silent
steps:
- name: Check out code
uses: actions/checkout@master
- name: install chef
uses: actionshub/chef-install@main
- name: Check InSpec version
run: inspec version
- name: Run InSpec
run: 'inspec exec . --reporter=cli json:results.json || true'
- name: Display the results summary
uses: mitre/saf_action@v1
with:
command_string: 'view summary -i results.json'
- name: Ensure the scan meets the results threshold
uses: mitre/saf_action@v1
with:
command_string: 'validate threshold -i results.json -F threshold.yml'
- name: Save Test Result JSON
uses: actions/upload-artifact@v4
with:
path: results.json