Skip to content

Commit 1946d13

Browse files
committed
20221014A
1 parent 7486a0f commit 1946d13

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

hugoalh.GitHubActionsToolkit/module/artifact.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Function Export-Artifact {
3434
[Parameter(Mandatory = $True, Position = 0, ValueFromPipelineByPropertyName = $True)][String]$Name,
3535
[Parameter(Mandatory = $True, ParameterSetName = 'Path', Position = 1, ValueFromPipelineByPropertyName = $True)][SupportsWildcards()][Alias('File', 'Files', 'Paths')][String[]]$Path,
3636
[Parameter(Mandatory = $True, ParameterSetName = 'LiteralPath', ValueFromPipelineByPropertyName = $True)][Alias('LiteralFile', 'LiteralFiles', 'LiteralPaths', 'LP', 'PSPath', 'PSPaths')][String[]]$LiteralPath,
37-
[Parameter(ValueFromPipelineByPropertyName = $True)][ValidateScript({ [System.IO.Path]::IsPathRooted($_) -and (Test-Path -LiteralPath $_ -PathType 'Container') }, ErrorMessage = '`{0}` is not an exist and valid GitHub Actions artifact base root!')][Alias('Root')][String]$BaseRoot = $Env:GITHUB_WORKSPACE,
37+
[Parameter(ValueFromPipelineByPropertyName = $True)][ValidateScript({ [System.IO.Path]::IsPathRooted($_) -and (Test-Path -LiteralPath $_ -PathType 'Container') }, ErrorMessage = '`{0}` is not an exist and valid directory!')][Alias('Root')][String]$BaseRoot = $Env:GITHUB_WORKSPACE,
3838
[Parameter(ValueFromPipelineByPropertyName = $True)][Alias('ContinueOnError')][Switch]$ContinueOnIssue,
3939
[Parameter(ValueFromPipelineByPropertyName = $True)][Alias('RetentionDay')][Byte]$RetentionTime
4040
)

hugoalh.GitHubActionsToolkit/module/cache.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Function Restore-Cache {
3434
[OutputType([String])]
3535
Param (
3636
[Parameter(Mandatory = $True, Position = 0, ValueFromPipelineByPropertyName = $True)][Alias('Keys', 'Name', 'Names')][String[]]$Key,
37-
[Parameter(Mandatory = $True, ParameterSetName = 'Path', Position = 1, ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)][SupportsWildcards()][Alias('File', 'Files', 'Paths')][String[]]$Path,
38-
[Parameter(Mandatory = $True, ParameterSetName = 'LiteralPath', ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)][Alias('LiteralFile', 'LiteralFiles', 'LiteralPaths', 'LP', 'PSPath', 'PSPaths')][String[]]$LiteralPath,
37+
[Parameter(Mandatory = $True, ParameterSetName = 'Path', Position = 1, ValueFromPipelineByPropertyName = $True)][SupportsWildcards()][Alias('File', 'Files', 'Paths')][String[]]$Path,
38+
[Parameter(Mandatory = $True, ParameterSetName = 'LiteralPath', ValueFromPipelineByPropertyName = $True)][Alias('LiteralFile', 'LiteralFiles', 'LiteralPaths', 'LP', 'PSPath', 'PSPaths')][String[]]$LiteralPath,
3939
[Parameter(ValueFromPipelineByPropertyName = $True)][Alias('NoAzureSdk')][Switch]$NotUseAzureSdk,
4040
[Parameter(ValueFromPipelineByPropertyName = $True)][ValidateRange(1, 16)][Alias('Concurrency')][Byte]$DownloadConcurrency,
4141
[Parameter(ValueFromPipelineByPropertyName = $True)][ValidateRange(5, 900)][UInt16]$Timeout,
@@ -94,7 +94,7 @@ Maximum chunk size of the cache, by KB.
9494
.PARAMETER UploadConcurrency
9595
Number of parallel uploads of the cache.
9696
.OUTPUTS
97-
[String] Cache ID.
97+
[String] ID of the cache.
9898
#>
9999
Function Save-Cache {
100100
[CmdletBinding(DefaultParameterSetName = 'Path', HelpUri = 'https://github.com/hugoalh-studio/ghactions-toolkit-powershell/wiki/api_function_save-githubactionscache#Save-GitHubActionsCache')]

hugoalh.GitHubActionsToolkit/module/environment-variable.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Import-Module -Name (
1414
.SYNOPSIS
1515
GitHub Actions - Add PATH
1616
.DESCRIPTION
17-
Add PATH to the current step and/or all subsequent steps in the current job.
17+
Add PATH to the current step and/or all of the subsequent steps in the current job.
1818
.PARAMETER Path
1919
Absolute paths.
2020
.PARAMETER NoValidator
@@ -41,7 +41,7 @@ Function Add-PATH {
4141
$Path |
4242
Select-Object -Unique
4343
)) {
44-
If (!$NoValidator.IsPresent -and !(Test-Path -Path $Item -PathType 'Container' -IsValid)) {
44+
If (!$NoValidator.IsPresent -and ![System.IO.Path]::IsPathRooted($Item) -and !(Test-Path -Path $Item -PathType 'Container' -IsValid)) {
4545
Write-Error -Message "``$Item`` is not a valid PATH!" -Category 'SyntaxError'
4646
Continue
4747
}
@@ -65,7 +65,7 @@ Function Add-PATH {
6565
.SYNOPSIS
6666
GitHub Actions - Set Environment Variable
6767
.DESCRIPTION
68-
Set environment variable to the current step and/or all subsequent steps in the current job.
68+
Set environment variable to the current step and/or all of the subsequent steps in the current job.
6969
.PARAMETER InputObject
7070
Environment variables.
7171
.PARAMETER Name

hugoalh.GitHubActionsToolkit/module/log.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Function Write-Debug {
139139
[CmdletBinding(HelpUri = 'https://github.com/hugoalh-studio/ghactions-toolkit-powershell/wiki/api_function_write-githubactionsdebug#Write-GitHubActionsDebug')]
140140
[OutputType([Void])]
141141
Param (
142-
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True)][Alias('Content')][String]$Message
142+
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)][Alias('Content')][String]$Message
143143
)
144144
Process {
145145
Write-GitHubActionsCommand -Command 'debug' -Value $Message
@@ -275,7 +275,7 @@ Function Write-Raw {
275275
[CmdletBinding(HelpUri = 'https://github.com/hugoalh-studio/ghactions-toolkit-powershell/wiki/api_function_write-githubactionsraw#Write-GitHubActionsRaw')]
276276
[OutputType([Void])]
277277
Param (
278-
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True)][AllowEmptyCollection()][AllowEmptyString()][AllowNull()][Alias('Content', 'Input', 'Message', 'Object')]$InputObject,
278+
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)][AllowEmptyCollection()][AllowEmptyString()][AllowNull()][Alias('Content', 'Input', 'Message', 'Object')]$InputObject,
279279
[Alias('GroupHeader', 'Header', 'Title')][String]$GroupTitle
280280
)
281281
Begin {

hugoalh.GitHubActionsToolkit/module/problem-matcher.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ GitHub Actions - Add Problem Matcher
1212
.DESCRIPTION
1313
Add problem matcher to scan the logs by specified regular expression patterns and automatically surface that information prominently in the user interface, both annotation and log decoration will create when a match is detected. For more information, please visit https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md.
1414
.PARAMETER Path
15-
Relative paths of the JSON problem matcher files.
15+
Paths of the JSON problem matcher files.
1616
.PARAMETER LiteralPath
17-
Relative literal paths of the JSON problem matcher files.
17+
Literal paths of the JSON problem matcher files.
1818
.OUTPUTS
1919
[Void]
2020
#>
@@ -47,7 +47,7 @@ Function Remove-ProblemMatcher {
4747
[CmdletBinding(HelpUri = 'https://github.com/hugoalh-studio/ghactions-toolkit-powershell/wiki/api_function_remove-githubactionsproblemmatcher#Remove-GitHubActionsProblemMatcher')]
4848
[OutputType([Void])]
4949
Param (
50-
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True)][ValidatePattern('^.+$', ErrorMessage = 'Parameter `Owner` must be in single line string!')][Alias('Identifies', 'Identify', 'Identifier', 'Identifiers', 'Key', 'Keys', 'Name', 'Names', 'Owners')][String[]]$Owner
50+
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)][ValidatePattern('^.+$', ErrorMessage = 'Parameter `Owner` must be in single line string!')][Alias('Identifies', 'Identify', 'Identifier', 'Identifiers', 'Key', 'Keys', 'Name', 'Names', 'Owners')][String[]]$Owner
5151
)
5252
Process {
5353
$Owner |

hugoalh.GitHubActionsToolkit/module/step-summary.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Function Add-StepSummary {
2626
[CmdletBinding(HelpUri = 'https://github.com/hugoalh-studio/ghactions-toolkit-powershell/wiki/api_function_add-githubactionsstepsummary#Add-GitHubActionsStepSummary')]
2727
[OutputType([Void])]
2828
Param (
29-
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True)][AllowEmptyCollection()][AllowEmptyString()][AllowNull()][Alias('Content')][String[]]$Value,
30-
[Switch]$NoNewLine
29+
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)][AllowEmptyCollection()][AllowEmptyString()][AllowNull()][Alias('Content')][String[]]$Value,
30+
[Parameter(ValueFromPipelineByPropertyName = $True)][Switch]$NoNewLine
3131
)
3232
Begin {
3333
[Boolean]$NoOperation = !(Test-GitHubActionsEnvironment -StepSummary)# When the requirements are not fulfill, only stop this function but not others.
@@ -287,7 +287,7 @@ Function Set-StepSummary {
287287
[CmdletBinding(HelpUri = 'https://github.com/hugoalh-studio/ghactions-toolkit-powershell/wiki/api_function_set-githubactionsstepsummary#Set-GitHubActionsStepSummary')]
288288
[OutputType([Void])]
289289
Param (
290-
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True)][AllowEmptyCollection()][AllowEmptyString()][AllowNull()][Alias('Content')][String[]]$Value,
290+
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)][AllowEmptyCollection()][AllowEmptyString()][AllowNull()][Alias('Content')][String[]]$Value,
291291
[Switch]$NoNewLine
292292
)
293293
Begin {

hugoalh.GitHubActionsToolkit/module/utility.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Make a secret get masked from the log.
1515
.PARAMETER Value
1616
A secret that need to get masked from the log.
1717
.PARAMETER WithChunks
18-
Split a secret into chunks to well make a secret get masked from the log.
18+
Whether to split a secret into chunks to well make a secret get masked from the log.
1919
.OUTPUTS
2020
[Void]
2121
#>
@@ -24,7 +24,7 @@ Function Add-SecretMask {
2424
[OutputType([Void])]
2525
Param (
2626
[Parameter(Mandatory = $True, Position = 0, ValueFromPipeline = $True, ValueFromPipelineByPropertyName = $True)][AllowEmptyString()][AllowNull()][Alias('Key', 'Secret', 'Token')][String]$Value,
27-
[Alias('Chunk', 'Chunks', 'WithChunk')][Switch]$WithChunks
27+
[Parameter(ValueFromPipelineByPropertyName = $True)][Alias('Chunk', 'Chunks', 'WithChunk')][Switch]$WithChunks
2828
)
2929
Process {
3030
If ($Value.Length -igt 0) {

0 commit comments

Comments
 (0)