|
1 | 1 | # Initialize-PSModule |
2 | | -An action that is used to prepare the runner for PSModule framework |
| 2 | + |
| 3 | +An action that is used to prepare the runner for PSModule framework. |
| 4 | + |
| 5 | +## Specifications and practices |
| 6 | + |
| 7 | +Initiate-PSModule follows: |
| 8 | + |
| 9 | +- [SemVer 2.0.0 specifications](https://semver.org) |
| 10 | +- [GitHub Flow specifications](https://docs.github.com/en/get-started/using-github/github-flow) |
| 11 | +- [Continiuous Delivery practices](https://en.wikipedia.org/wiki/Continuous_delivery) |
| 12 | + |
| 13 | +... and supports the following practices in the PSModule framework: |
| 14 | + |
| 15 | +- [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) |
| 16 | + |
| 17 | +## How it works |
| 18 | + |
| 19 | +The Initialize-PSModule action will prepare the runner for the PSModule framework by installing the following dependencies: |
| 20 | + |
| 21 | +| Module | Description | |
| 22 | +| --- | --- | |
| 23 | +| Utilities | Used by all actions, contains common function and classes such as logging, grouping and the [PSSemVer] class. | |
| 24 | +| powershell-yaml | Used to parse and serialize YAML files, typically for reading configuration files. | |
| 25 | +| Pester | Used for testing PowerShell code. | |
| 26 | +| PSScriptAnalyzer | Used to lint and format PowerShell code. | |
| 27 | +| platyPS | Used to generate Markdown documentation from PowerShell code. | |
| 28 | + |
| 29 | +It also makes the following environment variables available to the runner: |
| 30 | + |
| 31 | +| Variable | Description | |
| 32 | +| --- | --- | |
| 33 | +| GITHUB_REPOSITORY_NAME | Contains the name of the repository, used to automatically act as the name of the module. | |
| 34 | + |
| 35 | +## Usage |
| 36 | + |
| 37 | +The action can be configured using the following settings: |
| 38 | + |
| 39 | +| Name | Description | Default | Required | |
| 40 | +| --- | --- | --- | --- | |
| 41 | +| | | | | |
| 42 | + |
| 43 | +### Configuration file |
| 44 | + |
| 45 | +There are no configuration settings for the Initialize-PSModule action. |
| 46 | + |
| 47 | +## Example |
| 48 | + |
| 49 | +The action can be used in a workflow to prepare the runner for the PSModule framework by adding it at the start of the workflow. |
| 50 | + |
| 51 | +```yaml |
| 52 | +name: Process-PSModule |
| 53 | + |
| 54 | +on: [push] |
| 55 | + |
| 56 | +jobs: |
| 57 | + Process-PSModule: |
| 58 | + name: Process module |
| 59 | + runs-on: ubuntu-latest |
| 60 | + steps: |
| 61 | + - name: Checkout Code |
| 62 | + uses: actions/checkout@v4 |
| 63 | + |
| 64 | + - name: Initialize environment |
| 65 | + uses: PSModule/Initialize-PSModule@main |
| 66 | +``` |
| 67 | +
|
| 68 | +## Permissions |
| 69 | +
|
| 70 | +The action does not require any permissions. |
0 commit comments