Skip to content

Commit f0a55ea

Browse files
🩹 [Patch]: Add basic GitHub-Script inputs (#4)
## Description This pull request includes updates to the README.md and action.yml files to add new input options for the GitHub-Script action. Updates to input options: - `README.md`: - Modified the description for the Debug option and added new options for Verbose, Version, and Prerelease. - `action.yml`: - Updated the Debug option description and added new input options Verbose, Version, and Prerelease with their respective descriptions and default values. - Added the new input options Debug, Prerelease, Verbose, and Version to the runs configuration to ensure they are passed correctly to the script. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 1ea7523 commit f0a55ea

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ customize rule selection, severity filtering, and custom rule inclusion.
1717

1818
| Input | Description | Required | Default |
1919
|---------------------|----------------------------------------------------------------|----------|-----------------------------------------------------------------------------|
20-
| **Path** | The path to the code to test. | No | `${{ github.workspace }}` |
21-
| **Settings** | The type of tests to run: `Module`, `SourceCode`, or `Custom`. | No | `Custom` |
22-
| **SettingsFilePath**| If `Custom` is selected, the path to the settings file. | No | `${{ github.workspace }}/.github/linters/.powershell-psscriptanalyzer.psd1` |
20+
| `Path` | The path to the code to test. | false | `${{ github.workspace }}` |
21+
| `Settings` | The type of tests to run: `Module`, `SourceCode`, or `Custom`. | false | `Custom` |
22+
| `SettingsFilePath` | If `Custom` is selected, the path to the settings file. | false | `${{ github.workspace }}/.github/linters/.powershell-psscriptanalyzer.psd1` |
23+
| `Debug` | Enable debug output. | false | `'false'` |
24+
| `Verbose` | Enable verbose output. | false | `'false'` |
25+
| `Version` | Specifies the exact version of the GitHub module to install. | false | |
26+
| `Prerelease` | Allow prerelease versions if available. | false | `'false'` |
2327

2428
## Outputs
2529

action.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ inputs:
1818
description: If 'Custom' is selected, the path to the settings file.
1919
required: false
2020
default: ${{ github.workspace }}/.github/linters/.powershell-psscriptanalyzer.psd1
21+
Debug:
22+
description: Enable debug output.
23+
required: false
24+
default: 'false'
25+
Verbose:
26+
description: Enable verbose output.
27+
required: false
28+
default: 'false'
29+
Version:
30+
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
31+
required: false
32+
Prerelease:
33+
description: Allow prerelease versions if available.
34+
required: false
35+
default: 'false'
2136

2237
runs:
2338
using: composite
@@ -30,6 +45,10 @@ runs:
3045
GITHUB_ACTION_INVOKE_SCRIPTANALYZER_INPUT_Settings: ${{ inputs.Settings }}
3146
GITHUB_ACTION_INVOKE_SCRIPTANALYZER_INPUT_SettingsFilePath: ${{ inputs.SettingsFilePath }}
3247
with:
48+
Debug: ${{ inputs.Debug }}
49+
Prerelease: ${{ inputs.Prerelease }}
50+
Verbose: ${{ inputs.Verbose }}
51+
Version: ${{ inputs.Version }}
3352
Script: ${{ github.action_path }}/scripts/main.ps1
3453

3554
- name: Invoke-Pester
@@ -39,6 +58,10 @@ runs:
3958
Settings: ${{ fromJson(steps.paths.outputs.result).Settings }}
4059
SettingsFilePath: ${{ fromJson(steps.paths.outputs.result).SettingsFilePath }}
4160
with:
61+
Debug: ${{ inputs.Debug }}
62+
Prerelease: ${{ inputs.Prerelease }}
63+
Verbose: ${{ inputs.Verbose }}
64+
Version: ${{ inputs.Version }}
4265
TestResult_TestSuiteName: PSScriptAnalyzer
4366
Path: ${{ github.action_path }}/scripts/tests/PSScriptAnalyzer
4467
Run_Path: ${{ inputs.Path }}

0 commit comments

Comments
 (0)