Skip to content

Commit fde65d9

Browse files
Add verification step for Helpers module installation in Action-Test workflow
1 parent 94abace commit fde65d9

File tree

2 files changed

+64
-7
lines changed

2 files changed

+64
-7
lines changed

.github/workflows/Action-Test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,12 @@ jobs:
2727

2828
- name: Action-Test
2929
uses: ./
30+
31+
- name: Verify Helpers Module Installation
32+
shell: pwsh
33+
run: |
34+
if (Get-Module -Name Helpers -ListAvailable) {
35+
Write-Host "Helpers module successfully installed."
36+
} else {
37+
throw "Helpers module not found!"
38+
}

README.md

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,65 @@
1-
# Template-Action
1+
# Install-PSModuleHelpers
2+
3+
A GitHub Action to install and configure the PSModule helper modules for use in continuous integration and delivery (CI/CD) workflows. This action is
4+
a critical component for setting up a standardized PowerShell environment across repositories using the PSModule framework.
5+
6+
This GitHub Action is a part of the [PSModule framework](https://github.com/PSModule). It is recommended to use the
7+
[Process-PSModule workflow](https://github.com/PSModule/Process-PSModule) to automate the whole process of managing the PowerShell module.
28

3-
A template repository for GitHub Actions
49

510
## Usage
611

7-
### Inputs
12+
```yaml
13+
- name: Install PSModule Helpers
14+
uses: PSModule/Install-PSModuleHelpers@v1
15+
```
16+
17+
## Inputs
18+
19+
_No inputs required._
20+
21+
## Secrets
22+
23+
_No secrets required._
24+
25+
## Outputs
826
9-
### Secrets
27+
This action does not provide any outputs.
1028
11-
### Outputs
29+
## Example
1230
13-
### Example
31+
Here's a complete workflow example demonstrating how to use the Install-PSModuleHelpers action:
1432
1533
```yaml
16-
Example here
34+
name: CI
35+
36+
on:
37+
push:
38+
branches:
39+
- main
40+
41+
jobs:
42+
build:
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Install PSModule Helpers
49+
uses: PSModule/Install-PSModuleHelpers@v1
50+
51+
- name: Run additional steps
52+
shell: pwsh
53+
run: |
54+
# Example usage of imported Helpers module
55+
Get-Command -Module Helpers
1756
```
57+
58+
## What this action does:
59+
60+
- Removes any existing instances of the `Helpers` module from the PowerShell session.
61+
- Copies the latest version of the `Helpers` module into the PowerShell module directory.
62+
- Imports the `Helpers` module, ensuring it is available for subsequent steps.
63+
64+
This action helps maintain consistency and reliability across workflows that depend on the PSModule framework.
65+

0 commit comments

Comments
 (0)