2022-02-03 09:44:39 +03:00
|
|
|
#
|
|
|
|
# GitHub Action manifest for PSRule
|
|
|
|
#
|
2019-09-02 13:46:27 +03:00
|
|
|
name: 'PSRule'
|
|
|
|
description: 'Run rules in a GitHub repository.'
|
2020-06-07 14:51:23 +03:00
|
|
|
author: 'Microsoft'
|
2019-09-03 16:12:14 +03:00
|
|
|
branding:
|
2020-06-07 10:04:48 +03:00
|
|
|
icon: 'check-circle'
|
|
|
|
color: 'green'
|
2020-04-17 10:14:18 +03:00
|
|
|
inputs:
|
|
|
|
inputType:
|
|
|
|
description: 'Determines the type of input to use for PSRule.'
|
2020-06-07 13:30:27 +03:00
|
|
|
default: 'repository'
|
|
|
|
required: false
|
2020-04-17 10:14:18 +03:00
|
|
|
|
|
|
|
inputPath:
|
|
|
|
description: 'The path PSRule will look for files to validate.'
|
|
|
|
default: ''
|
2020-06-07 10:04:48 +03:00
|
|
|
required: false
|
2020-04-17 10:14:18 +03:00
|
|
|
|
|
|
|
modules:
|
|
|
|
description: 'A comma separated list of modules to use for analysis.'
|
|
|
|
default: ''
|
2020-06-07 10:04:48 +03:00
|
|
|
required: false
|
2020-04-17 10:14:18 +03:00
|
|
|
|
2019-09-02 13:46:27 +03:00
|
|
|
source:
|
2020-04-17 10:14:18 +03:00
|
|
|
description: 'An path containing rules to use for analysis.'
|
2019-09-03 16:12:14 +03:00
|
|
|
default: '.ps-rule/'
|
2020-06-07 10:04:48 +03:00
|
|
|
required: false
|
2020-04-17 10:14:18 +03:00
|
|
|
|
2021-03-01 06:59:15 +03:00
|
|
|
baseline:
|
|
|
|
description: 'The name of a PSRule baseline to use.'
|
|
|
|
default: ''
|
|
|
|
required: false
|
|
|
|
|
2021-08-19 09:25:37 +03:00
|
|
|
conventions:
|
|
|
|
description: 'A comma separated list of conventions to use.'
|
|
|
|
default: ''
|
|
|
|
required: false
|
|
|
|
|
2022-04-05 02:44:31 +03:00
|
|
|
option:
|
|
|
|
description: 'The path to an options file.'
|
|
|
|
default: ''
|
|
|
|
required: false
|
|
|
|
|
2022-10-17 04:02:55 +03:00
|
|
|
outcome:
|
|
|
|
description: 'Filters output to include results with the specified outcome.'
|
|
|
|
default: ''
|
|
|
|
required: false
|
|
|
|
|
2020-04-17 10:14:18 +03:00
|
|
|
outputFormat:
|
|
|
|
description: 'The format to use when writing results to disk. When set to None results are not written to disk.'
|
|
|
|
default: 'None'
|
2020-06-07 10:04:48 +03:00
|
|
|
required: false
|
2020-04-17 10:14:18 +03:00
|
|
|
|
|
|
|
outputPath:
|
|
|
|
description: 'The file path to write results to.'
|
|
|
|
default: ''
|
2020-06-07 10:04:48 +03:00
|
|
|
required: false
|
2020-04-17 10:14:18 +03:00
|
|
|
|
|
|
|
path:
|
|
|
|
description: 'The working directory PSRule is run from.'
|
|
|
|
default: ''
|
2020-06-07 10:04:48 +03:00
|
|
|
required: false
|
2020-04-17 10:14:18 +03:00
|
|
|
|
2020-12-31 09:29:36 +03:00
|
|
|
prerelease:
|
|
|
|
description: 'Determine if a pre-release module version is installed.'
|
|
|
|
default: 'false'
|
|
|
|
required: false
|
|
|
|
|
2022-03-23 13:35:03 +03:00
|
|
|
repository:
|
|
|
|
description: 'The name of the PowerShell repository where PSRule modules are installed from. By default this is the PowerShell Gallery.'
|
|
|
|
default: 'PSGallery'
|
|
|
|
required: false
|
|
|
|
|
2023-03-15 16:04:03 +03:00
|
|
|
summary:
|
|
|
|
description: 'Determines if a job summary is written.'
|
|
|
|
default: 'true'
|
|
|
|
required: false
|
|
|
|
|
2022-02-03 09:44:39 +03:00
|
|
|
version:
|
|
|
|
description: 'The specific version of PSRule to use.'
|
|
|
|
default: ''
|
|
|
|
required: false
|
|
|
|
|
2019-09-02 11:40:52 +03:00
|
|
|
runs:
|
2022-02-03 09:44:39 +03:00
|
|
|
using: 'composite'
|
|
|
|
steps:
|
2022-10-17 04:02:55 +03:00
|
|
|
- name: 'Analysis'
|
|
|
|
shell: pwsh
|
|
|
|
working-directory: ${{ github.workspace }}
|
|
|
|
run: |-
|
2023-03-15 16:04:03 +03:00
|
|
|
${{ github.action_path }}/powershell.ps1 -InputType '${{ inputs.inputType }}' -InputPath '${{ inputs.inputPath }}' -Modules '${{ inputs.modules }}' -Source '${{ inputs.source }}' -Baseline '${{ inputs.baseline }}' -Conventions '${{ inputs.conventions }}' -Option '${{ inputs.option }}' -Outcome '${{ inputs.outcome }}' -OutputFormat '${{ inputs.outputFormat }}' -OutputPath '${{ inputs.outputPath }}' -Path '${{ inputs.path }}' -PreRelease '${{ inputs.prerelease }}' -Repository '${{ inputs.repository }}' -Summary '${{ inputs.summary }}' -Version '${{ inputs.version }}'
|